export const CHAT_SESSIONS = [
	{ id: 'employment', title: '用工需求咨询', time: '今天 14:30' },
	{ id: 'knowledge', title: '用工知识咨询', time: '今天 10:15' },
	{ id: 'order', title: '用工订单管理', time: '昨天 16:20' },
	{ id: 'cost', title: '成本测算', time: '3天前' },
	{ id: 'attendance', title: '现场考勤记录', time: '3天前' },
	{ id: 'emergency', title: '紧急事件处理', time: '1周前' }
]

export const CHAT_DATA = {
	employment: [
		{ type: 'text', role: 'ai', content: '老板早上好！为您汇报昨日进度：' },
		{ type: 'report', role: 'ai' },
		{ type: 'draft', role: 'ai' },
		{ type: 'text', role: 'user', content: '招10个搬运工，浦东仓库，2天' },
		{ type: 'summary1', role: 'ai' },
		{ type: 'summary2', role: 'ai' }
	],
	knowledge: [
		{ type: 'text', role: 'ai', content: '我可以为您解答灵活用工政策法规、税务处理、合同管理、社保保险、用工风险等方面的问题。请告诉我您想了解哪方面的内容？' },
		{ type: 'knowledge_actions', role: 'ai' }
	],
	order: [
		{ type: 'text', role: 'ai', content: '当前订单状态：' },
		{ type: 'orders', role: 'ai' }
	],
	cost: [
		{ type: 'text', role: 'ai', content: '请告诉我用工人数、工作天数和日薪标准，我来帮您精准测算成本。例如："10个人，工作2天，日薪500元"' }
	],
	attendance: [
		{ type: 'text', role: 'ai', content: '请用自然语言描述今天的考勤情况，例如："今天张三请假，李四加班了2小时，王五计件做了500个"。我会自动匹配当前批次并生成考勤卡片。' }
	],
	emergency: [
		{ type: 'text', role: 'ai', content: '当发生紧急事件时，请描述事件情况，我会生成处理指南并帮您一键生成保险报案草稿。例如："有工人搬东西砸到脚了，现在去医院"' }
	]
}

export const BATCH_QR = {
	modalTitle: '方案已确认',
	subtitle: '浦东仓库搬运 BATCH-001',
	hint: '分享给临时工扫码即可登记',
	batchId: 'BATCH-001',
	title: '浦东仓库搬运',
	registered: 7,
	total: 10,
	shareLink: 'https://fe.example.com/r/BATCH-001'
}

// 15×15 演示二维码点阵（真机兼容，不依赖 SVG 图片）
export const QR_DEMO_PATTERN =
	'111111111111111' +
	'100000000000001' +
	'101111011111101' +
	'101010010101101' +
	'101111011111101' +
	'100000000000001' +
	'111111011111111' +
	'000000011010000' +
	'101101011110101' +
	'010101010101010' +
	'101011011110101' +
	'010100010101010' +
	'101111011111101' +
	'100000000000001' +
	'111111111111111'

export const DAILY_REPORT = {
	date: '今天',
	items: [
		{ title: '浦东仓库', desc: '搬运 BATCH-001', value: '8/10 人已登记', status: 'normal' },
		{ title: '王五实名失败', desc: '请提醒临时工重新提交身份信息', value: '已自动提醒', status: 'danger' },
		{ title: '结算单待确认', desc: '浦东仓库搬运 BATCH-001', value: '¥12,800', status: 'pending' }
	]
}

export const PROGRESS_PERSONS = [
	{ name: '张三', phone: '138****1234', status: 'done', statusText: '已完成' },
	{ name: '李四', phone: '139****5678', status: 'done', statusText: '已完成' },
	{ name: '王五', phone: '137****9012', status: 'fail', statusText: '核验失败' },
	{ name: '赵六', phone: '136****3456', status: 'pending', statusText: '待登记' },
	{ name: '钱七', phone: '135****7890', status: 'review', statusText: '审核中' }
]

export const PROGRESS_STEPS = [
	{ key: 'draft', title: '草稿创建', time: '01-15 14:30', status: 'done' },
	{ key: 'plan', title: '方案确认', time: '01-15 14:35', status: 'done' },
	{ key: 'register', title: '扫码登记', status: 'active', highlight: '进行中 7/10' },
	{ key: 'review', title: '企业审核', status: 'pending' },
	{ key: 'contract', title: '合同签署', status: 'pending' },
	{ key: 'work', title: '开始用工', status: 'pending' }
]

export const TRADITIONAL_COST_PLAN = {
	icon: 'ⓘ',
	title: '传统用工 (B)',
	total: '¥15,200',
	avgCost: '¥760/天'
}

export const COST_PLANS = [
	{
		id: 'a',
		recommended: true,
		icon: '⭐',
		title: '合规优先 (A)',
		total: '¥12,800',
		avgCost: '¥640/天',
		rows: [
			{ label: '到手金额', value: '¥500/天' }
		],
		breakdown: [
			{ label: '劳务费', value: '¥10,000' },
			{ label: '服务费(8%)', value: '¥800' },
			{ label: '保险(高档)', value: '¥200' },
			{ label: '税费代征', value: '¥1,800' }
		],
		compliance: ['业务真实', '资金合规', '个税申报']
	},
	{
		id: 'c',
		icon: '💡',
		title: '成本优先 (C)',
		total: '¥11,200',
		avgCost: '¥560/天',
		rows: [
			{ label: '到手金额', value: '¥420/天' }
		],
		breakdown: [
			{ label: '劳务费', value: '¥9,000' },
			{ label: '服务费(8%)', value: '¥720' },
			{ label: '保险(基础)', value: '¥80' },
			{ label: '税费代征', value: '¥1,400' }
		],
		compliance: ['业务真实', '资金合规']
	}
]

export const MESSAGES = [
	{ type: 'pending', title: '结算单待确认', desc: '浦东仓库搬运 BATCH-001 · ¥12,800', time: '10分钟前' },
	{ type: 'error', title: '王五实名核验失败', desc: '请提醒临时工重新提交身份信息', time: '1小时前' }
]

export const WALLET_RECORDS = [
	{ title: '浦东仓库搬运', meta: '01-20 · 已完成', amount: '¥1,000' },
	{ title: '虹桥活动执行', meta: '01-15 · 已完成', amount: '¥800' }
]

export function showToast(title) {
	uni.showToast({ title, icon: 'none', duration: 2000 })
}
