import { useSlots as m, ref as S, computed as n, openBlock as s, createElementBlock as l, normalizeStyle as c, normalizeClass as _, createElementVNode as d, renderSlot as a, createTextVNode as g, toDisplayString as v, createCommentVNode as i, createVNode as k, withCtx as $ } from "vue"; import { n as x } from "./index2.js"; import { S as z } from "./index9.js"; const N = { class: "s-panel-layout-title" }, w = { key: 0, class: "s-panel-layout-extra" }, B = { class: "s-panel-layout-content" }, P = { key: 1, class: "s-panel-layout-footer" }, V = /* @__PURE__ */ Object.assign({ name: "SPanelLayout" }, { __name: "SPanelLayout", props: { // 面板标题 title: { type: String, default: "" }, // 是否显示标题栏(传了 #extra 插槽时也会显示) showTitle: { type: Boolean, default: !0 }, // 面板高度:默认占满父容器,可传 '100vh' / 'calc(100vh - 60px)' / 具体像素值 height: { type: [String, Number], default: "100%" }, headerSticky: { type: Boolean, default: !1 } }, setup(r) { const e = r, o = m(), h = S(8), u = n(() => !!(e.title || o.title || o.extra || o.footer)), p = n(() => e.showTitle && !!(e.title || o.title || o.extra)), f = n(() => !u.value || e.height === null || e.height === void 0 || e.height === "" || e.height === "100%" ? null : { height: typeof e.height == "number" ? `${e.height}px` : e.height }); return (t, b) => { const y = z; return s(), l("div", { class: _(["s-panel-layout", { "is-panel": u.value }]), style: c(f.value) }, [ p.value ? (s(), l("div", { key: 0, class: "s-panel-layout-header", style: c({ position: e.headerSticky ? "sticky" : "" }) }, [ d("div", N, [ a(t.$slots, "title", {}, () => [ g(v(r.title), 1) ], !0) ]), t.$slots.extra ? (s(), l("div", w, [ a(t.$slots, "extra", {}, void 0, !0) ])) : i("", !0) ], 4)) : i("", !0), d("div", B, [ a(t.$slots, "default", {}, void 0, !0) ]), t.$slots.footer ? (s(), l("div", P, [ k(y, { size: h.value }, { default: $(() => [ a(t.$slots, "footer", {}, void 0, !0) ]), _: 3 }, 8, ["size"]) ])) : i("", !0) ], 6); }; } }), E = /* @__PURE__ */ x(V, [["__scopeId", "data-v-e4c46e17"]]); export { E as default };