import { ref as n, watch as b, watchEffect as g, openBlock as S, createBlock as C, withCtx as a, createElementVNode as c, renderSlot as m, createVNode as s, createTextVNode as u, toDisplayString as f } from "vue"; import { n as N, B as $ } from "./index2.js"; import { _ as k } from "./index8.js"; import { S as B } from "./index9.js"; const D = { class: "s-drawer-body" }, x = { class: "s-drawer-footer" }, z = { __name: "SDrawer", props: { value: { type: Boolean, default: !1 }, title: { type: String, default: "" }, mode: { type: String, default: "right" }, width: { type: Number, default: 500 }, height: { type: Number, default: 378 } }, emits: ["update:value", "confirm"], setup(o, { emit: p }) { const l = p, t = o, i = n(t.value); b( () => t.value, (e) => { i.value = e; }, { immediate: !0 } ); const _ = n(t.mode), h = n(8); g(() => { const e = { left: "", right: "", top: "", bottom: "" }; Object.keys(e).includes(t.mode) || (console.warn(`当前设置mode【${t.mode}】不在【${e}】中,已默认为【right】`), _.value = "right"); }); const r = () => { l("update:value", !1); }, v = () => { l("update:value", !1), l("confirm"); }; return (e, V) => { const d = $, w = B, y = k; return S(), C(y, { rootClassName: "s-drawer-wrap", title: o.title, placement: o.mode, width: o.width, visible: i.value, onClose: r, bodyStyle: { padding: 0, display: "flex", flexDirection: "column" } }, { default: a(() => [ c("div", D, [ m(e.$slots, "default", {}, void 0, !0) ]), c("div", x, [ s(w, { size: h.value }, { default: a(() => [ m(e.$slots, "footer", {}, () => [ s(d, { onClick: r }, { default: a(() => [ u(f(e.$l("取消")), 1) ]), _: 1 }), s(d, { type: "primary", onClick: v }, { default: a(() => [ u(f(e.$l("确定")), 1) ]), _: 1 }) ], !0) ]), _: 3 }, 8, ["size"]) ]) ]), _: 3 }, 8, ["title", "placement", "width", "visible"]); }; } }, T = /* @__PURE__ */ N(z, [["__scopeId", "data-v-dddcb41d"]]); export { T as default };