import { watch as a, inject as y, onMounted as u, createElementBlock as p, openBlock as h, unref as d, createElementVNode as i, renderSlot as n } from "vue";
/* empty css                            */
import x from "../../../_virtual/_plugin-vue_export-helper.js";
const f = ["id"], _ = ["id"], m = ["id"], v = ["id"], b = {
  __name: "AdaptiveExtendedLayout",
  props: {
    isSecondColVisible: {
      type: Boolean,
      required: !0
    },
    isThirdColVisible: {
      type: Boolean,
      required: !0
    }
  },
  setup(s) {
    const o = s;
    a(
      () => [o.isSecondColVisible, o.isThirdColVisible],
      () => {
        o.isSecondColVisible && r(), o.isThirdColVisible && c();
      },
      { immediate: !0 }
    );
    const t = y("chatAppId"), c = () => {
      const e = document.getElementById("extern-layout-container-" + t);
      e.style.setProperty("--chotto-adaptive-extended-layout-second-col-display", "none"), e.style.setProperty("--chotto-adaptive-extended-layout-third-col-display", "flex"), e.style.setProperty("--chotto-adaptive-extended-layout-second-col-width", "0%"), e.style.setProperty("--chotto-adaptive-extended-layout-third-col-width", "100%");
    }, r = () => {
      const e = document.getElementById("extern-layout-container-" + t);
      e.style.setProperty("--chotto-adaptive-extended-layout-second-col-display", "flex"), e.style.setProperty("--chotto-adaptive-extended-layout-third-col-display", "none"), e.style.setProperty("--chotto-adaptive-extended-layout-second-col-width", "100%"), e.style.setProperty("--chotto-adaptive-extended-layout-third-col-width", "0%");
    };
    return u(() => {
      const e = document.getElementById("extern-layout-container-" + t), l = document.getElementById("extend-layout-first-col-" + t);
      e.style.setProperty("--chotto-adaptive-extended-layout-first-col-width", l.offsetWidth + "px");
    }), (e, l) => (h(), p("div", {
      id: "extern-layout-container-" + d(t),
      ref: "refContainer",
      class: "extend-layout__container"
    }, [
      i("div", {
        id: "extend-layout-first-col-" + d(t),
        class: "extend-layout__first-col"
      }, [
        n(e.$slots, "first-col", {}, void 0, !0)
      ], 8, _),
      i("div", {
        id: "extend-layout-second-col-" + d(t),
        class: "extend-layout__second-col"
      }, [
        n(e.$slots, "second-col", {}, void 0, !0)
      ], 8, m),
      i("div", {
        id: "extend-layout-third-col-" + d(t),
        class: "extend-layout__third-col"
      }, [
        n(e.$slots, "third-col", {}, void 0, !0)
      ], 8, v)
    ], 8, f));
  }
}, B = /* @__PURE__ */ x(b, [["__scopeId", "data-v-45cdbb05"]]);
export {
  B as default
};
