import { defineComponent, useCssVars, unref, ref, toRefs, openBlock, createElementBlock, createElementVNode, createVNode, Fragment, renderList, isRef } from "vue";
import _sfc_main$1 from "../../../NComponents/configCommon/refConfig.mjs";
import left1 from "./images/righttitle1.mjs";
import left2 from "./images/righttitle2.mjs";
import right1 from "./images/lefttitle1.mjs";
import right2 from "./images/lefttitle2.mjs";
import "./index.vue_vue_type_style_index_0_scoped_true_lang.mjs";
import _export_sfc from "../../../../_virtual/plugin-vue_export-helper.mjs";
const _hoisted_1 = { class: "header" };
const _hoisted_2 = { class: "header_content" };
const _hoisted_3 = { class: "btnBox" };
const _hoisted_4 = ["src", "onClick"];
const __default__ = defineComponent({ name: "EHeader02" });
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    chartConfig: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    useCssVars((_ctx) => ({
      "86cc5aea": unref(w) + "px",
      "b9fdbd8c": unref(h) + "px"
    }));
    let list = ref([
      {
        default: left1,
        act: left2
      },
      {
        default: right1,
        act: right2
      }
    ]);
    let act = ref(0);
    const { titleConfig, imageConfig } = toRefs(props.chartConfig.option);
    const { w, h } = toRefs(props.chartConfig.attr);
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", null, [
        createElementVNode("div", _hoisted_1, [
          createElementVNode("div", _hoisted_2, [
            createVNode(_sfc_main$1, {
              config: unref(imageConfig),
              type: "img",
              class: "img"
            }, null, 8, ["config"]),
            createVNode(_sfc_main$1, {
              config: unref(titleConfig),
              type: "text"
            }, null, 8, ["config"])
          ])
        ]),
        createElementVNode("div", _hoisted_3, [
          (openBlock(true), createElementBlock(Fragment, null, renderList(unref(list), (item, index) => {
            return openBlock(), createElementBlock("img", {
              key: index,
              src: unref(act) == index ? item.act : item.default,
              onClick: ($event) => isRef(act) ? act.value = index : act = index
            }, null, 8, _hoisted_4);
          }), 128))
        ])
      ]);
    };
  }
});
var _EHeader02 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4fcd21a8"]]);
export { _EHeader02 as default };
