/** 技能模块假数据，接口就绪后替换 */



export const MAIN_TYPES = {

	MASSAGE: 'massage',

	PLAYMATE: 'playmate',

}



export const SKILL_CATEGORIES = [

	{ id: '1', name: '上门按摩' },

	{ id: '2', name: '台球' },

	{ id: '3', name: '爬山' },

	{ id: '4', name: '电影' },

	{ id: '5', name: '健身运动' },

	{ id: '6', name: '读书学习' },
	{ id: '7', name: '读书学习' },

]



/** 陪玩子分类 Tab（技能管理 / 开通新服务） */

export const PLAYMATE_TABS = [

	{ id: 'p4', name: '台球' },

	{ id: 'p2', name: '爬山' },

	{ id: 'p3', name: '电影' },

	{ id: 'p1', name: '羽毛球' },

	{ id: 'p5', name: '健身运动' },

	{ id: 'p6', name: '读书学习' },
	

]



/** status: opened | pending | rejected */

export const MOCK_MY_SKILLS = [

	{

		id: 's1',

		categoryId: '1',

		title: '中式推拿-培元疏通',

		cover: '',

		price: 200,

		priceMin: null,

		priceMax: null,

		unit: '次',

		soldCount: 200,

		status: 'opened',

		applyDate: '2025年12月1日申请开通服务',

		rejectReason: '',

		billingType: '按分钟计费',

		platformPrice: 368,

		priceRangeMin: 288,

		priceRangeMax: 368,

		canEdit: true,

	},

	{

		id: 's2',

		categoryId: '1',

		title: '中式推拿-培元疏通',

		cover: '',

		price: 200,

		priceMin: 200,

		priceMax: 260,

		unit: '次',

		soldCount: 0,

		status: 'rejected',

		applyDate: '',

		rejectReason: '申请上架审核驳回：当前时段该服务不支持申请开通，请稍后再试或联系客服了解详情。',

		billingType: '按分钟计费',

		platformPrice: 368,

		priceRangeMin: 288,

		priceRangeMax: 368,

		canEdit: false,

	},

	{

		id: 's3',

		categoryId: '1',

		title: '中式推拿-培元疏通',

		cover: '',

		price: 200,

		priceMin: 200,

		priceMax: 260,

		unit: '次',

		soldCount: 0,

		status: 'pending',

		applyDate: '',

		rejectReason: '',

		billingType: '按分钟计费',

		platformPrice: 368,

		priceRangeMin: 288,

		priceRangeMax: 368,

		canEdit: false,

	},

]



/** 可开通的服务（未开通） */

export const MOCK_AVAILABLE_SKILLS = [

	{

		id: 'a1',

		mainType: MAIN_TYPES.MASSAGE,

		categoryId: '1',

		title: '中式推拿-培元疏通标题标题标题标题标题',

		cover: '',

		price: 175,

		unit: '次',

	},

	{

		id: 'a2',

		mainType: MAIN_TYPES.MASSAGE,

		categoryId: '1',

		title: '泰式SPA-舒缓放松',

		cover: '',

		price: 268,

		unit: '次',

	},

	{

		id: 'a3',

		mainType: MAIN_TYPES.MASSAGE,

		categoryId: '1',

		title: '精油开背-深度调理',

		cover: '',

		price: 198,

		unit: '次',

	},

	{

		id: 'a4',

		mainType: MAIN_TYPES.MASSAGE,

		categoryId: '1',

		title: '足疗养生-经典套餐',

		cover: '',

		price: 128,

		unit: '次',

	},

	{

		id: 'a5',

		mainType: MAIN_TYPES.PLAYMATE,

		categoryId: 'p1',

		title: '羽毛球陪练-初级教学',

		cover: '',

		price: 128,

		unit: '小时',

	},

	{

		id: 'a6',

		mainType: MAIN_TYPES.PLAYMATE,

		categoryId: 'p1',

		title: '羽毛球双打搭档',

		cover: '',

		price: 150,

		unit: '小时',

	},

	{

		id: 'a7',

		mainType: MAIN_TYPES.PLAYMATE,

		categoryId: 'p2',

		title: '户外徒步向导',

		cover: '',

		price: 150,

		unit: '次',

	},

	{

		id: 'a8',

		mainType: MAIN_TYPES.PLAYMATE,

		categoryId: 'p2',

		title: '登山陪爬-周末专线',

		cover: '',

		price: 180,

		unit: '次',

	},

	{

		id: 'a9',

		mainType: MAIN_TYPES.PLAYMATE,

		categoryId: 'p3',

		title: '影院观影陪伴',

		cover: '',

		price: 88,

		unit: '次',

	},

	{

		id: 'a10',

		mainType: MAIN_TYPES.PLAYMATE,

		categoryId: 'p4',

		title: '中式8球教学',

		cover: '',

		price: 128,

		unit: '小时',

	},

	{

		id: 'a11',

		mainType: MAIN_TYPES.PLAYMATE,

		categoryId: 'p5',

		title: '健身房私教陪练',

		cover: '',

		price: 168,

		unit: '小时',

	},

]



export const STATUS_TABS = [

	{ key: 'opened', label: '已开通' },

	{ key: 'pending', label: '申请中' },

	{ key: 'rejected', label: '申请驳回' },

]



export function formatPrice(item) {

	if (item.priceMin != null && item.priceMax != null) {

		return `¥${item.priceMin} 至 ${item.priceMax}/${item.unit || '次'}`

	}

	return `¥${item.price}/${item.unit || '次'}`

}



export function formatAvailablePrice(item) {

	const price = Number(item.price || 0).toFixed(2)

	return `¥ ${price}/${item.unit || '次'}`

}



export function formatPriceRange(min, max) {

	return `¥${min} 至 ${max}`

}


