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-C_RgxGrN.js";
import { b, q as x, v as S, x as C, y as w } from "./Button-C1y42oVo.js";
import { r as T } from "./dist-BVQ2eZ4j.js";
import { a as E, n as D, r as O, t as k } from "./DashboardSidebarToggle-N7Zj2ZiP.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 = e2, n2 = x(), r2 = b(`dashboardPanel`, t2), p2 = E({ storageKey: `dashboard`, unit: `%` }), m2 = `${p2.storageKey}-panel-${t2.id || a()}`, { el: y2, size: S2, isDragging: C2, onMouseDown: T2, onTouchStart: k2, onDoubleClick: M2 } = O(m2, g(() => ({ ...p2, ...t2 }))), N2 = u(() => w({ extend: w(A), ...n2.ui?.dashboardPanel || {} })({ size: !!S2.value }));
  return (n3, a2) => (d(), c(f, null, [s(`div`, l({ id: m2, ref_key: `el`, ref: y2 }, n3.$attrs, { "data-dragging": i(C2), "data-slot": `root`, class: N2.value.root({ class: [i(r2)?.root, t2.class] }), style: [i(S2) ? { "--width": `${i(S2)}${i(p2).unit}` } : void 0] }), [_(n3.$slots, `default`, {}, () => [_(n3.$slots, `header`), s(`div`, { "data-slot": `body`, class: o(N2.value.body({ class: i(r2)?.body })) }, [_(n3.$slots, `body`)], 2), _(n3.$slots, `footer`)])], 16, j), _(n3.$slots, `resize-handle`, { onMouseDown: i(T2), onTouchStart: i(k2), onDoubleClick: i(M2) }, () => [e2.resizable ? (d(), h(D, { key: 0, "aria-controls": m2, "data-slot": `handle`, class: o(N2.value.handle({ class: i(r2)?.handle })), onMousedown: i(T2), onTouchstart: i(k2), onDblclick: i(M2) }, 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(), A2 = b(`dashboardNavbar`, g2), j2 = E({}), [M2, P2] = T(), F = u(() => w({ extend: w(N), ...O2.ui?.dashboardNavbar || {} })());
  return (r2, u2) => (d(), c(f, null, [t(i(M2), null, { default: p(() => [_(r2.$slots, `toggle`, e(y({ ...i(j2), ui: F.value })), () => [a2.toggle ? (d(), h(k, l({ key: 0 }, typeof a2.toggle == `object` ? a2.toggle : {}, { side: a2.toggleSide, "data-slot": `toggle`, class: F.value.toggle({ class: i(A2)?.toggle, toggleSide: a2.toggleSide }) }), null, 16, [`side`, `class`])) : v(``, true)])]), _: 3 }), t(i(C), l({ as: a2.as }, r2.$attrs, { "data-slot": `root`, class: F.value.root({ class: [i(A2)?.root, g2.class] }) }), { default: p(() => [s(`div`, { "data-slot": `left`, class: o(F.value.left({ class: i(A2)?.left })) }, [a2.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 })), () => [a2.icon ? (d(), h(S, { key: 0, name: a2.icon, "data-slot": `icon`, class: o(F.value.icon({ class: i(A2)?.icon })) }, null, 8, [`name`, `class`])) : v(``, true)]), s(`h1`, { "data-slot": `title`, class: o(F.value.title({ class: i(A2)?.title })) }, [_(r2.$slots, `title`, {}, () => [n(m(a2.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(A2)?.center })) }, [_(r2.$slots, `default`, e(y(i(j2))))], 2)) : v(``, true), s(`div`, { "data-slot": `right`, class: o(F.value.right({ class: i(A2)?.right })) }, [_(r2.$slots, `right`, e(y(i(j2)))), a2.toggleSide === `right` ? (d(), h(i(P2), { key: 0 })) : v(``, true)], 2)]), _: 3 }, 16, [`as`, `class`])], 64));
} });
export {
  M as n,
  P as t
};
