const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_index = require("../pisellCheckboxGroup/index.js");
const require_index$1 = require("../pisellWalletPassCard/index.js");
const require_index$2 = require("../pisellEmpty/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
require("./index.less");
//#region src/components/pisellCardList/index.tsx
/**
* 卡列表组件
* @param props
* @constructor
*/
const PisellCardList = (props) => {
	const { data = [], loadMoreData = () => {}, endMessage, loader, hasMore, onChange, value, mode, direction = "vertical", fullWidth, type, showName, showCode, showCover, showDetail, showBalance, showRedeem, showQrCode, showStoreName, showValidDate, empty, showEmpty, showBalanceSymbol, onChangeDebounce, showStatus, nameTitleStyle, enableEditAmount, useExternalDetail, onDetail, formatBalance, formatBalanceTitle, formatRedeem, formatRedeemTitle, onBeforeEditAmount, onItemClick, showActiveBackground, validDateBySchedule, scheduleList } = props;
	return data.length ? /* @__PURE__ */ react.default.createElement(require_index.default, {
		options: data,
		value,
		mode,
		direction,
		rowKey: "id",
		gap: 12,
		onChange,
		iconPosition: "hide",
		fullWidth,
		onChangeDebounce,
		onItemClick,
		showActiveBackground,
		renderOption: (item, active, index) => {
			return /* @__PURE__ */ react.default.createElement(require_index$1.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, item), {}, {
				active,
				mode,
				showActiveIcon: true,
				showStatus: showStatus || (item === null || item === void 0 ? void 0 : item.showStatus),
				cardStatus: item === null || item === void 0 ? void 0 : item.cardStatus,
				nameTitleStyle: nameTitleStyle || (item === null || item === void 0 ? void 0 : item.nameTitleStyle),
				showName: showName || (item === null || item === void 0 ? void 0 : item.showName),
				showBalance: showBalance || (item === null || item === void 0 ? void 0 : item.showBalance),
				showCode: showCode || (item === null || item === void 0 ? void 0 : item.showCode),
				showCover: showCover || (item === null || item === void 0 ? void 0 : item.showCover),
				showDetail: showDetail || (item === null || item === void 0 ? void 0 : item.showDetail),
				showQrCode: showQrCode || (item === null || item === void 0 ? void 0 : item.showQrCode),
				showRedeem: showRedeem || (item === null || item === void 0 ? void 0 : item.showRedeem),
				showStoreName: showStoreName || (item === null || item === void 0 ? void 0 : item.showStoreName),
				showValidDate: showValidDate || (item === null || item === void 0 ? void 0 : item.showValidDate),
				showBalanceSymbol: showBalanceSymbol || (item === null || item === void 0 ? void 0 : item.showBalanceSymbol),
				showActions: props.showActions || (item === null || item === void 0 ? void 0 : item.showActions),
				actions: props.actions || (item === null || item === void 0 ? void 0 : item.actions),
				enableEditAmount: enableEditAmount || (item === null || item === void 0 ? void 0 : item.enableEditAmount),
				useExternalDetail: useExternalDetail || (item === null || item === void 0 ? void 0 : item.useExternalDetail),
				onDetail: (record) => {
					var _props$onDetail;
					return props === null || props === void 0 || (_props$onDetail = props.onDetail) === null || _props$onDetail === void 0 ? void 0 : _props$onDetail.call(props, record, index);
				},
				validDateBySchedule: validDateBySchedule || (item === null || item === void 0 ? void 0 : item.validDateBySchedule),
				scheduleList: scheduleList || (item === null || item === void 0 ? void 0 : item.scheduleList),
				beforeEdit: (record) => {
					var _props$beforeEdit;
					return props === null || props === void 0 || (_props$beforeEdit = props.beforeEdit) === null || _props$beforeEdit === void 0 ? void 0 : _props$beforeEdit.call(props, record, index);
				},
				onConfirmEditAmount: (value) => {
					var _props$onConfirmEditA;
					(_props$onConfirmEditA = props.onConfirmEditAmount) === null || _props$onConfirmEditA === void 0 || _props$onConfirmEditA.call(props, value, index, item);
				},
				onConfirmEdit: (newVal) => {
					var _props$onConfirmEdit;
					(_props$onConfirmEdit = props.onConfirmEdit) === null || _props$onConfirmEdit === void 0 || _props$onConfirmEdit.call(props, newVal, index, item);
				},
				formatBalance: formatBalance || (item === null || item === void 0 ? void 0 : item.formatBalance),
				formatBalanceTitle: formatBalanceTitle || (item === null || item === void 0 ? void 0 : item.formatBalanceTitle),
				type,
				style: direction === "vertical" || direction === "horizontal" && fullWidth ? { width: "100%" } : {},
				formatRedeem: formatRedeem || (item === null || item === void 0 ? void 0 : item.formatRedeem),
				formatRedeemTitle: formatRedeemTitle || (item === null || item === void 0 ? void 0 : item.formatRedeemTitle),
				onBeforeEditAmount: (record) => {
					var _props$onBeforeEditAm;
					return props === null || props === void 0 || (_props$onBeforeEditAm = props.onBeforeEditAmount) === null || _props$onBeforeEditAm === void 0 ? void 0 : _props$onBeforeEditAm.call(props, record, index, item);
				}
			}));
		}
	}) : showEmpty && (empty || /* @__PURE__ */ react.default.createElement(require_index$2.default, null));
};
var pisellCardList_default = (0, react.memo)(PisellCardList);
//#endregion
exports.default = pisellCardList_default;
