// @bun
var{defineProperty:i,getOwnPropertyNames:h,getOwnPropertyDescriptor:v}=Object,y=Object.prototype.hasOwnProperty;function k(e){return this[e]}var E=(e)=>{var t=(d??=new WeakMap).get(e),r;if(t)return t;if(t=i({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var a of h(e))if(!y.call(t,a))i(t,a,{get:k.bind(e,a),enumerable:!(r=v(e,a))||r.enumerable})}return d.set(e,t),t},d;var S=(e)=>e;function D(e,t){this[e]=S.bind(null,t)}var q=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0,configurable:!0,set:D.bind(t,r)})};var B=(e,t)=>()=>(e&&(t=e(e=0)),t);var C=import.meta.require;function l(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function s(e,t){if(e.serverDynamic[t]!==void 0)return String(e.serverDynamic[t]);let r=e.static[t];if(typeof r==="string")return r;return}var c,H;var O=B(()=>{c={sm:"16rem",md:"24rem",lg:"32rem",xl:"40rem"},H={name:"StxDrawer",aliases:["stx-drawer"],render(e,t,r){let a=s(e,"id");if(!a)return console.warn('[stx] <StxDrawer> requires an "id" prop'),"<!-- StxDrawer: missing id prop -->";let o=l(a),p=s(e,"side")||"right",u=s(e,"size")||"md",f=s(e,"closeOnBackdrop")!=="false",g=s(e,"closeOnEscape")!=="false",m=s(e,"overlay")!=="false",w=c[u]||c.md,n=p==="left",x=n?"left:0":"right:0",b=n?"translateX(-100%)":"translateX(100%)",R=n?"stx-drawer-slide-left":"stx-drawer-slide-right";return`<div id="stx-drawer-${o}" class="stx-drawer-backdrop" data-stx-drawer="${o}" data-close-backdrop="${f}" data-close-escape="${g}" style="display:none;position:fixed;inset:0;z-index:99999;${m?"background:rgba(0,0,0,0.5);backdrop-filter:blur(2px)":"background:transparent;pointer-events:none"};opacity:0;transition:opacity 0.2s ease" role="dialog" aria-modal="true">
  <div class="stx-drawer-panel" style="position:fixed;top:0;bottom:0;${x};width:${w};max-width:100vw;transform:${b};transition:transform 0.3s cubic-bezier(0.4,0,0.2,1);background:var(--stx-drawer-bg,#fff);color:var(--stx-drawer-text,#1f2937);box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow-y:auto;pointer-events:auto">
    <div style="padding:1.5rem">${t}</div>
  </div>
</div>
<style>
@media(prefers-color-scheme:dark){[data-stx-drawer]{--stx-drawer-bg:#1f2937;--stx-drawer-text:#f3f4f6}}
.stx-drawer-backdrop[data-stx-drawer-open]{display:block!important;opacity:1}
.stx-drawer-backdrop[data-stx-drawer-open] .stx-drawer-panel{transform:translateX(0)}
</style>`}}});O();export{H as StxDrawerBuiltin};
