import { defineComponent as r, computed as n, openBlock as p, createElementBlock as m, normalizeStyle as c, normalizeClass as d, unref as l, renderSlot as u, createCommentVNode as f } from "vue";
import "../config-provider/index.mjs";
import { useNamespace as y } from "../config-provider/hooks/use-namespace.mjs";
const b = /* @__PURE__ */ r({
  name: "InternalSplitterPanel",
  __name: "Panel",
  props: {
    className: {},
    prefixCls: {},
    supportMotion: { type: Boolean },
    style: { default: () => ({}) },
    min: {},
    max: {},
    size: {},
    collapsible: { type: [Boolean, Object] },
    resizable: { type: Boolean },
    defaultSize: {},
    destroyOnHidden: { type: Boolean }
  },
  setup(t) {
    const e = t, { b: s } = y("splitter-panel"), a = n(
      () => e.size === 0 || typeof e.size == "string" && Number.parseFloat(e.size) === 0
    ), i = n(() => {
      const o = e.size !== void 0;
      return {
        ...e.style,
        flexBasis: o ? `${e.size}px` : "auto",
        flexGrow: o ? 0 : 1
      };
    });
    return (o, z) => (p(), m("div", {
      class: d([l(s)(), { [l(s)("hidden")]: t.size === 0, [l(s)("transition")]: t.supportMotion }, t.className]),
      style: c(i.value)
    }, [
      t.destroyOnHidden && a.value ? f("", !0) : u(o.$slots, "default", { key: 0 })
    ], 6));
  }
});
export {
  b as default
};
