import { $n as e, D as t, E as n, Lt as r, On as i, Pt as a, Zn as o, _ as s, b as c, et as l, g as u, mt as d, o as f, qt as p, tr as m, v as h, wn as g, xt as _, y as v, z as y } from "./runtime-core.esm-bundler-Ci9kEgM7.js";
import { C as b, S as x, X as S, b as C, y as w } from "./Button-CzGEASGR.js";
import { r as T } from "./dist-D5YmEqpM.js";
import { a as E, n as D, r as O, t as k } from "./DashboardSidebarToggle-HsDHFq4c.js";
var A = { slots: { root: `relative flex flex-col min-w-0 min-h-svh lg:not-last:border-e lg:not-last:border-default shrink-0`, body: `flex flex-col gap-4 sm:gap-6 flex-1 overflow-y-auto p-4 sm:p-6`, handle: `` }, variants: { size: { true: { root: `w-full lg:w-(--width)` }, false: { root: `flex-1` } } } }, j = [`data-dragging`], M = Object.assign({ inheritAttrs: false }, { __name: `DashboardPanel`, props: { class: { type: null, required: false }, ui: { type: Object, required: false }, id: { type: String, required: false }, minSize: { type: Number, required: false, default: 15 }, maxSize: { type: Number, required: false }, defaultSize: { type: Number, required: false }, resizable: { type: Boolean, required: false, default: false } }, setup(e2) {
  let t2 = x(`dashboardPanel`, e2), n2 = S(), r2 = E({ storageKey: `dashboard`, unit: `%` }), p2 = `${r2.storageKey}-panel-${t2.id || a()}`, { el: m2, size: y2, isDragging: b2, onMouseDown: w2, onTouchStart: T2, onDoubleClick: k2 } = O(p2, g(() => ({ ...r2, ...t2 }))), M2 = u(() => C({ extend: C(A), ...n2.ui?.dashboardPanel || {} })({ size: !!y2.value }));
  return (e3, n3) => (d(), c(f, null, [s(`div`, l({ id: p2, ref_key: `el`, ref: m2 }, e3.$attrs, { "data-dragging": i(b2), "data-slot": `root`, class: M2.value.root({ class: [i(t2).ui?.root, i(t2).class] }), style: [i(y2) ? { "--width": `${i(y2)}${i(r2).unit}` } : void 0] }), [_(e3.$slots, `default`, {}, () => [_(e3.$slots, `header`), s(`div`, { "data-slot": `body`, class: o(M2.value.body({ class: i(t2).ui?.body })) }, [_(e3.$slots, `body`)], 2), _(e3.$slots, `footer`)])], 16, j), _(e3.$slots, `resize-handle`, { onMouseDown: i(w2), onTouchStart: i(T2), onDoubleClick: i(k2) }, () => [i(t2).resizable ? (d(), h(D, { key: 0, "aria-controls": p2, "data-slot": `handle`, class: o(M2.value.handle({ class: i(t2).ui?.handle })), onMousedown: i(w2), onTouchstart: i(T2), onDblclick: i(k2) }, null, 8, [`class`, `onMousedown`, `onTouchstart`, `onDblclick`])) : v(``, true)])], 64));
} }), N = { slots: { root: `h-(--ui-header-height) shrink-0 flex items-center justify-between border-b border-default px-4 sm:px-6 gap-1.5`, left: `flex items-center gap-1.5 min-w-0`, icon: `shrink-0 size-5 self-center me-1.5`, title: `flex items-center gap-1.5 font-semibold text-highlighted truncate`, center: `hidden lg:flex`, right: `flex items-center shrink-0 gap-1.5`, toggle: `` }, variants: { toggleSide: { left: { toggle: `` }, right: { toggle: `` } } } }, P = Object.assign({ inheritAttrs: false }, { __name: `DashboardNavbar`, props: { as: { type: null, required: false }, icon: { type: null, required: false }, title: { type: String, required: false }, toggle: { type: [Boolean, Object], required: false, default: true }, toggleSide: { type: String, required: false, default: `left` }, class: { type: null, required: false }, ui: { type: Object, required: false } }, setup(a2) {
  let g2 = a2, D2 = r(), O2 = x(`dashboardNavbar`, g2), A2 = S(), j2 = E({}), [M2, P2] = T(), F = u(() => C({ extend: C(N), ...A2.ui?.dashboardNavbar || {} })());
  return (r2, a3) => (d(), c(f, null, [t(i(M2), null, { default: p(() => [_(r2.$slots, `toggle`, e(y({ ...i(j2), ui: F.value })), () => [i(O2).toggle ? (d(), h(k, l({ key: 0 }, typeof i(O2).toggle == `object` ? i(O2).toggle : {}, { side: i(O2).toggleSide, "data-slot": `toggle`, class: F.value.toggle({ class: i(O2).ui?.toggle, toggleSide: i(O2).toggleSide }) }), null, 16, [`side`, `class`])) : v(``, true)])]), _: 3 }), t(i(b), l({ as: i(O2).as }, r2.$attrs, { "data-slot": `root`, class: F.value.root({ class: [i(O2).ui?.root, i(O2).class] }) }), { default: p(() => [s(`div`, { "data-slot": `left`, class: o(F.value.left({ class: i(O2).ui?.left })) }, [i(O2).toggleSide === `left` ? (d(), h(i(P2), { key: 0 })) : v(``, true), _(r2.$slots, `left`, e(y(i(j2))), () => [_(r2.$slots, `leading`, e(y({ ...i(j2), ui: F.value })), () => [i(O2).icon ? (d(), h(w, { key: 0, name: i(O2).icon, "data-slot": `icon`, class: o(F.value.icon({ class: i(O2).ui?.icon })) }, null, 8, [`name`, `class`])) : v(``, true)]), s(`h1`, { "data-slot": `title`, class: o(F.value.title({ class: i(O2).ui?.title })) }, [_(r2.$slots, `title`, {}, () => [n(m(i(O2).title), 1)])], 2), _(r2.$slots, `trailing`, e(y({ ...i(j2), ui: F.value })))])], 2), D2.default ? (d(), c(`div`, { key: 0, "data-slot": `center`, class: o(F.value.center({ class: i(O2).ui?.center })) }, [_(r2.$slots, `default`, e(y(i(j2))))], 2)) : v(``, true), s(`div`, { "data-slot": `right`, class: o(F.value.right({ class: i(O2).ui?.right })) }, [_(r2.$slots, `right`, e(y(i(j2)))), i(O2).toggleSide === `right` ? (d(), h(i(P2), { key: 0 })) : v(``, true)], 2)]), _: 3 }, 16, [`as`, `class`])], 64));
} });
export {
  M as n,
  P as t
};
