import { FormConfig } from "/@/components/PageSearch";
import dayjs from "dayjs";
import { useUserStore } from "/@/store/modules/user";

const now = new Date();
const start = dayjs(now).format("YYYY-MM-DD");

const searchFormConfig: FormConfig = {
  formItems: [
    {
      field: "date",
      type: "date_picker",
      defaultValue: [start, start],
      trigger: "change",
      otherOptions: {
        type: "daterange",
        startPlaceholder: "下单开始时间",
        endPlaceholder: "下单结束时间",
        valueFormat: "YYYY-MM-DD",
        startProp: "start",
        endProp: "end"
      }
    },
    {
      field: "depart_id",
      type: "depart-query",
      trigger: "change"
      // disabled: Number(level) === 1,
      // defaultValue: info.item || ""
    }
  ]
};

export default searchFormConfig;
