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);
var stdin_exports = {};
__export(stdin_exports, {
  RegionalSetting: () => RegionalSetting
});
module.exports = __toCommonJS(stdin_exports);
var import_vue = require("vue");
var import_pro_utils = require("@antdv/pro-utils");
var import_ant_design_vue = require("ant-design-vue");
var import_vue2 = require("vue");
var import_index = require("./index");
var import_LayoutChange = require("./LayoutChange");
const regionalSettingProps = {
  settings: (0, import_pro_utils.objectType)().isRequired,
  changeSetting: (0, import_pro_utils.funcType)().isRequired,
  hashId: (0, import_pro_utils.stringType)().isRequired,
  prefixCls: (0, import_pro_utils.stringType)().isRequired
};
const RegionalSetting = (0, import_vue2.defineComponent)({
  name: "RegionalSetting",
  props: regionalSettingProps,
  setup(props) {
    const formatMessage = (0, import_index.getFormatMessage)();
    return () => {
      const {
        settings,
        prefixCls,
        changeSetting,
        hashId
      } = props;
      const regionalSetting = ["header", "footer", "menu", "menuHeader"];
      return (0, import_vue.createVNode)(import_ant_design_vue.List, {
        "class": `${prefixCls}-list ${hashId}`.trim(),
        "split": false,
        "renderItem": import_LayoutChange.renderLayoutSettingItem,
        "dataSource": regionalSetting.map((key) => {
          return {
            title: formatMessage({
              id: `app.setting.regionalsettings.${key}`
            }),
            action: (0, import_vue.createVNode)(import_ant_design_vue.Switch, {
              "size": "small",
              "class": `regional-${key} ${hashId}`.trim(),
              "checked": settings[`${key}Render`] || settings[`${key}Render`] === void 0,
              "onChange": (checked) => changeSetting(`${key}Render`, checked === true ? void 0 : false)
            }, null)
          };
        })
      }, null);
    };
  }
});
