//#region src/components/ecocup/cupList/const.ts
const STATUS_TEXT_MAP = {
	in_stock: "pisell2.text.ecocup.status.in-stock",
	rent: "pisell2.text.ecocup.status.rent",
	return: "pisell2.text.ecocup.status.returned",
	missing: "pisell2.text.ecocup.action.more.missing",
	broken: "pisell2.text.ecocup.action.more.broken",
	shop_changed: "pisell2.text.ecocup.status.shop-changed"
};
const STATUS_COLOR_MAP = {
	in_stock: {
		backgroundColor: "transparent",
		color: "#A3A3A3",
		border: "#A3A3A3"
	},
	rent: {
		backgroundColor: "#ECFDF3",
		color: "#067647",
		border: "#ABEFC6"
	},
	return: {
		backgroundColor: "transparent",
		color: "#A3A3A3",
		border: "#A3A3A3"
	},
	shop_changed: {
		backgroundColor: "transparent",
		color: "#A3A3A3",
		border: "#A3A3A3"
	},
	overtime: {
		backgroundColor: "#FEF3F2",
		color: "#F04438",
		border: "#F04438"
	},
	expire_soon: {
		backgroundColor: "#FFFAEB",
		color: "#F79009",
		border: "#FEDF89"
	},
	borrowing: {
		backgroundColor: "#000000",
		color: "#000000",
		border: "#FEDF89"
	},
	missing: {
		backgroundColor: "#FEF3F2",
		color: "#F04438",
		border: "#F04438"
	},
	broken: {
		backgroundColor: "#FEF3F2",
		color: "#F04438",
		border: "#F04438"
	}
};
const STATUS_OPTIONS = [
	{
		label: "pisell2.text.ecocup.status.all",
		value: 0
	},
	{
		label: "pisell2.text.ecocup.status.in-stock",
		value: "in_stock"
	},
	{
		label: "pisell2.text.ecocup.status.rent",
		value: "rent"
	},
	{
		label: "pisell2.text.ecocup.action.more.missing",
		value: "missing"
	},
	{
		label: "pisell2.text.ecocup.action.more.broken",
		value: "broken"
	},
	{
		label: "pisell2.text.ecocup.status.shop-changed",
		value: "shop_changed"
	}
];
/**
* @description: 排序设置
* @return {*}
*/
const SORT_SETTINGS = {
	show: true,
	list: [{
		columnKey: "rent_time",
		key: "rent_time",
		type: "date",
		localFilter: false
	}, {
		columnKey: "return_time",
		key: "return_time",
		type: "date",
		localFilter: false
	}]
};
/**
* @description: 列配置
* @return {*}
*/
const COLUMN_SETTING = {
	show: true,
	storageMode: "localStorage"
};
/**
* @description: 过滤选项
* @return {*}
*/
const FILTER = (locales, isNormalShop, ecoShopLists, isPartner, currentPagination) => {
	let statusOptions = isPartner ? STATUS_OPTIONS : STATUS_OPTIONS.filter((item) => item.value !== "shop_changed");
	const _ecoShopLists = [{
		name: locales.getText("pisell2.text.ecocup.status.all"),
		id: 0
	}].concat(ecoShopLists || []);
	return {
		show: true,
		quickFilterMaxLength: 3,
		currentPagination: currentPagination || 1,
		list: [{
			key: "status",
			type: "select",
			columnKey: "",
			isCustom: true,
			name: "status",
			sort: true,
			localFilter: false,
			other: {
				size: "large",
				allowClear: true,
				showSearch: false,
				placeholder: locales.getText("pisell2.text.ecocup.status.placeholder"),
				defaultValue: 0,
				options: statusOptions.map((item) => ({
					label: locales.getText(item.label),
					value: item.value
				})),
				style: { width: 240 }
			}
		}, {
			key: "partner_shop_id",
			type: "select",
			columnKey: "",
			isCustom: true,
			name: "partner_shop_id",
			sort: true,
			localFilter: false,
			isHidden: isNormalShop,
			other: {
				size: "large",
				allowClear: true,
				showSearch: false,
				placeholder: locales.getText("pisell2.text.ecocup.status.shop.placeholder"),
				defaultValue: 0,
				options: _ecoShopLists.map((item) => ({
					label: (item === null || item === void 0 ? void 0 : item.name) || "",
					value: item.id
				})),
				style: { width: 240 }
			}
		}]
	};
};
const HEADER_RIGHT_OPTIONS = [{
	languageKey: "pisell2.text.ecocup.share.title",
	key: "share",
	size: "large",
	icon: "pisell2-share-06",
	type: "default"
}, {
	languageKey: "pisell2.text.ecocup.export.title",
	key: "export",
	size: "large",
	icon: "pisell2-download-01",
	type: "default"
}];
//#endregion
exports.COLUMN_SETTING = COLUMN_SETTING;
exports.FILTER = FILTER;
exports.HEADER_RIGHT_OPTIONS = HEADER_RIGHT_OPTIONS;
exports.SORT_SETTINGS = SORT_SETTINGS;
exports.STATUS_COLOR_MAP = STATUS_COLOR_MAP;
exports.STATUS_TEXT_MAP = STATUS_TEXT_MAP;
