import { defineComponent as u, openBlock as o, createBlock as s, unref as e, normalizeClass as n, withCtx as d, createElementVNode as c, toDisplayString as f, createVNode as v, createElementBlock as k, Fragment as g, renderList as y } from "vue";
import { Flex as h, Divider as C } from "@aplus-frontend/antdv";
import "../../../../config-provider/index.mjs";
import { useInjectApColumnSetting as _ } from "../context.mjs";
import "./item.vue.mjs";
import { useLocale as x } from "../../../../config-provider/hooks/use-locale.mjs";
import { useNamespace as L } from "../../../../config-provider/hooks/use-namespace.mjs";
import z from "./item.vue2.mjs";
const V = /* @__PURE__ */ u({
  __name: "index",
  props: {
    customizeTemplateList: {},
    persistenceKey: {}
  },
  setup(l) {
    const { t: m } = x(), { b: i } = L("ap-column-setting-template-list"), { activeKey: a } = _();
    function p(r) {
      a.value = r;
    }
    return (r, B) => (o(), s(e(h), {
      vertical: "",
      class: n(e(i)())
    }, {
      default: d(() => [
        c("div", {
          class: n(e(i)("title"))
        }, f(e(m)("ap.apTable.setting.templateSetting")), 3),
        v(e(C), { style: { margin: "0" } }),
        c("div", {
          class: n(e(i)("content"))
        }, [
          (o(!0), k(g, null, y(l.customizeTemplateList, (t) => (o(), s(z, {
            key: t.key,
            value: t,
            "is-active": e(a) === t.key,
            "should-remove": l.customizeTemplateList.length > 1,
            onClick: () => p(t.key)
          }, null, 8, ["value", "is-active", "should-remove", "onClick"]))), 128))
        ], 2)
      ]),
      _: 1
    }, 8, ["class"]));
  }
});
export {
  V as default
};
