var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/components/ecocup/cupList/const.ts
var const_exports = {};
__export(const_exports, {
  COLUMN_SETTING: () => COLUMN_SETTING,
  FILTER: () => FILTER,
  HEADER_RIGHT_OPTIONS: () => HEADER_RIGHT_OPTIONS,
  SORT_SETTINGS: () => SORT_SETTINGS,
  STATUS_COLOR_MAP: () => STATUS_COLOR_MAP,
  STATUS_TEXT_MAP: () => STATUS_TEXT_MAP
});
module.exports = __toCommonJS(const_exports);
var 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"
  // overtime: 'pisell2.text.ecocup.status.overtime',
  // expire_soon: 'pisell2.text.ecocup.status.expire-soon',
  // borrowing: 'pisell2.text.ecocup.status.borrowing',
};
var STATUS_COLOR_MAP = {
  in_stock: {
    backgroundColor: "transparent",
    color: "#A3A3A3",
    border: "#A3A3A3"
  },
  rent: {
    backgroundColor: "#ECFDF3",
    color: "#067647",
    border: "#ABEFC6"
  },
  returned: {
    backgroundColor: "#000000",
    color: "#000000"
  },
  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"
  }
};
var 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.returned',
  //   value: 'returned',
  // },
  {
    label: "pisell2.text.ecocup.status.shop-changed",
    value: "shop_changed"
  }
  // {
  //   label: 'pisell2.text.ecocup.status.overtime',
  //   value: 'overtime',
  // },
  // {
  //   label: 'pisell2.text.ecocup.status.expire-soon',
  //   value: 'expire_soon',
  // },
  // {
  //   label: 'pisell2.text.ecocup.status.borrowing',
  //   value: 'borrowing',
  // },
];
var SORT_SETTINGS = {
  show: true,
  list: [
    // {
    //   columnKey: 'cup_code',
    //   key: 'cup_code',
    //   type: 'string',
    //   localFilter: false,
    // },
    // {
    //   columnKey: 'customer',
    //   key: 'customer',
    //   type: 'string',
    //   localFilter: false,
    // },
    // {
    //   columnKey: 'status',
    //   key: 'status',
    //   type: 'string',
    //   localFilter: false,
    // },
    // {
    //   columnKey: 'shop_of_rent',
    //   key: 'shop_of_rent',
    //   type: 'string',
    //   localFilter: false,
    // },
    {
      columnKey: "rent_time",
      key: "rent_time",
      type: "date",
      localFilter: false
    },
    // {
    //   columnKey: 'shop_of_return',
    //   key: 'shop_of_return',
    //   type: 'string',
    //   localFilter: false,
    // },
    {
      columnKey: "return_time",
      key: "return_time",
      type: "date",
      localFilter: false
    }
  ]
};
var COLUMN_SETTING = {
  show: true,
  storageMode: "localStorage"
};
var 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: 'customer',
      //   type: 'search',
      //   columnKey: 'customer',
      //   sort: true,
      //   localFilter: false,
      //   other: {
      //     size: 'large',
      //     allowClear: true,
      //     placeholder: '搜索',
      //     trigger: ['onChange', 'onPressEnter'],
      //     style: {
      //       width: 180,
      //     },
      //   },
      // },
      {
        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 ? void 0 : item.name) || "",
            value: item.id
          })),
          style: {
            width: 240
          }
        }
      }
      // {
      //   key: 'shop_of_rent',
      //   type: 'text',
      //   columnKey: '',
      //   isCustom: true,
      //   name: 'shop_of_rent',
      //   sort: true,
      //   localFilter: false,
      //   other: {
      //     size: 'large',
      //     allowClear: true,
      //     placeholder: '搜索店铺',
      //     style: {
      //       width: 180,
      //     },
      //   },
      // },
      // {
      //   label: '租出时间',
      //   key: 'time_of_rent',
      //   type: 'rangePicker',
      //   columnKey: '',
      //   isCustom: true,
      //   name: 'time_of_rent',
      //   sort: true,
      //   localFilter: false,
      //   other: {
      //     size: 'large',
      //     allowClear: true,
      //     placeholder: '选择租出时间',
      //   },
      // },
      // {
      //   label: '归还店铺',
      //   key: 'shop_of_return',
      //   type: 'text',
      //   columnKey: '',
      //   isCustom: true,
      //   name: 'shop_of_return',
      //   sort: true,
      //   localFilter: false,
      //   other: {
      //     size: 'large',
      //     allowClear: true,
      //     placeholder: '搜索店铺',
      //   },
      // },
      // {
      //   label: '归还时间',
      //   key: 'time_of_return',
      //   type: 'rangePicker',
      //   columnKey: '',
      //   isCustom: true,
      //   name: 'time_of_return',
      //   sort: true,
      //   localFilter: false,
      //   other: {
      //     size: 'large',
      //     allowClear: true,
      //     placeholder: '搜索店铺',
      //   },
      // },
    ]
  };
};
var 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"
  }
];
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  COLUMN_SETTING,
  FILTER,
  HEADER_RIGHT_OPTIONS,
  SORT_SETTINGS,
  STATUS_COLOR_MAP,
  STATUS_TEXT_MAP
});
