1import{a8 as $,c as b,r as k,w as z,y as a,C as I,Q as _,D as S,z as o,X as E,K as d,A as K,H as w,J as l,O as r,u as M,a0 as N,Y as T,n as V}from"./vendor-misc-5pJBpqhN.js";import{_ as x,X as A}from"./index-BNPflmqD.js";const D=["aria-labelledby","aria-describedby"],R={key:0,class:"modal-panel__header"},X={class:"modal-panel__title-group"},H=["id"],J=["id"],O={class:"modal-panel__body"},Q={key:1,class:"modal-panel__footer"},Y={__name:"Modal",props:{open:{type:Boolean,default:!1},title:{type:String,default:""},description:{type:String,default:""},size:{type:String,default:"md",validator:e=>["sm","md","lg","xl","full"].includes(e)},persistent:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0}},emits:["update:open","close"],setup(e,{emit:C}){const n=e,u=C,f=$(),m=b(()=>`modal-title-${f}`),p=b(()=>`modal-desc-${f}`),y=k(null),h=k(null);function i(){u("update:open",!1),u("close")}function g(){n.persistent||i()}function B(){n.persistent||i()}return z(()=>n.open,async t=>{var c,s,v;t?(h.value=document.activeElement,document.body.style.overflow="hidden",await V(),(c=y.value)==null||c.focus()):(document.body.style.overflow="",(v=(s=h.value)==null?void 0:s.focus)==null||v.call(s))}),(t,c)=>(a(),I(T,{to:"body"},[_(N,{name:"modal"},{default:S(()=>[e.open?(a(),o("div",{key:0,class:"modal-root",role:"dialog","aria-modal":"true","aria-labelledby":e.title?m.value:void 0,"aria-describedby":e.description?p.value:void 0,onKeydown:E(g,["esc"])},[d("div",{class:"modal-backdrop",onClick:B}),d("div",{ref_key:"panelRef",ref:y,class:K(["modal-panel",[`modal-panel--${e.size}`]]),tabindex:"-1"},[e.title||t.$slots.header||e.showClose?(a(),o("header",R,[d("div",X,[e.title?(a(),o("h2",{key:0,id:m.value,class:"modal-panel__title"},w(e.title),9,H)):l("",!0),e.description?(a(),o("p",{key:1,id:p.value,class:"modal-panel__description"},w(e.description),9,J)):l("",!0),r(t.$slots,"header",{},void 0,!0)]),e.showClose?(a(),o("button",{key:0,type:"button",class:"modal-panel__close","aria-label":"Close dialog",onClick:i},[_(M(A),{size:18})])):l("",!0)])):l("",!0),d("div",O,[r(t.$slots,"default",{},void 0,!0)]),t.$slots.footer?(a(),o("footer",Q,[r(t.$slots,"footer",{},void 0,!0)])):l("",!0)],2)],40,D)):l("",!0)]),_:3})]))}},F=x(Y,[["__scopeId","data-v-3435de90"]]);export{F as M};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.