import{aK as L,dq as I,dr as $,aO as q,d as B,ds as x,dt as D,aF as T,b0 as H,du as y,e as d,r as h,aM as F,bq as O,bk as P,dv as M,au as i,o as t,A as N,f as r,B as n,k as U,C as w,m as G,aD as K,ac as a,c as o,aN as c,G as j,D as l,v as J,T as Q,q as V,aP as W,__tla as X}from"./index-92ad187a.js";let k,Y=Promise.all([(()=>{try{return X}catch{}})()]).then(async()=>{const C=B({name:"ElDrawer",components:{ElOverlay:x,ElFocusTrap:D,ElIcon:T,Close:H},inheritAttrs:!1,props:L({...I,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),emits:$,setup(e,{slots:s}){y({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},d(()=>!!s.title)),y({scope:"el-drawer",from:"custom-class",replacement:"class",version:"2.3.0",ref:"https://element-plus.org/en-US/component/drawer.html#attributes",type:"Attribute"},d(()=>!!e.customClass));const f=h(),b=h(),m=F("drawer"),{t:v}=O(),u=d(()=>e.direction==="rtl"||e.direction==="ltr"),p=d(()=>P(e.size));return{...M(e,f),drawerRef:f,focusStartRef:b,isHorizontal:u,drawerSize:p,ns:m,t:v}}}),_=["aria-label","aria-labelledby","aria-describedby"],R=["id","aria-level"],S=["aria-label"],E=["id"];k=W(q(C,[["render",function(e,s,f,b,m,v){const u=i("close"),p=i("el-icon"),z=i("el-focus-trap"),A=i("el-overlay");return t(),N(V,{to:"body",disabled:!e.appendToBody},[r(Q,{name:e.ns.b("fade"),onAfterEnter:e.afterEnter,onAfterLeave:e.afterLeave,onBeforeLeave:e.beforeLeave,persisted:""},{default:n(()=>[U(r(A,{mask:e.modal,"overlay-class":e.modalClass,"z-index":e.zIndex,onClick:e.onModalClick},{default:n(()=>[r(z,{loop:"",trapped:e.visible,"focus-trap-el":e.drawerRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:n(()=>[w("div",G({ref:"drawerRef","aria-modal":"true","aria-label":e.title||void 0,"aria-labelledby":e.title?void 0:e.titleId,"aria-describedby":e.bodyId},e.$attrs,{class:[e.ns.b(),e.direction,e.visible&&"open",e.customClass],style:e.isHorizontal?"width: "+e.drawerSize:"height: "+e.drawerSize,role:"dialog",onClick:s[1]||(s[1]=K(()=>{},["stop"]))}),[w("span",{ref:"focusStartRef",class:a(e.ns.e("sr-focus")),tabindex:"-1"},null,2),e.withHeader?(t(),o("header",{key:0,class:a(e.ns.e("header"))},[e.$slots.title?c(e.$slots,"title",{key:1},()=>[l(" DEPRECATED SLOT ")]):c(e.$slots,"header",{key:0,close:e.handleClose,titleId:e.titleId,titleClass:e.ns.e("title")},()=>[e.$slots.title?l("v-if",!0):(t(),o("span",{key:0,id:e.titleId,role:"heading","aria-level":e.headerAriaLevel,class:a(e.ns.e("title"))},j(e.title),11,R))]),e.showClose?(t(),o("button",{key:2,"aria-label":e.t("el.drawer.close"),class:a(e.ns.e("close-btn")),type:"button",onClick:s[0]||(s[0]=(...g)=>e.handleClose&&e.handleClose(...g))},[r(p,{class:a(e.ns.e("close"))},{default:n(()=>[r(u)]),_:1},8,["class"])],10,S)):l("v-if",!0)],2)):l("v-if",!0),e.rendered?(t(),o("div",{key:1,id:e.bodyId,class:a(e.ns.e("body"))},[c(e.$slots,"default")],10,E)):l("v-if",!0),e.$slots.footer?(t(),o("div",{key:2,class:a(e.ns.e("footer"))},[c(e.$slots,"footer")],2)):l("v-if",!0)],16,_)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[J,e.visible]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["disabled"])}],["__file","/home/runner/work/element-plus/element-plus/packages/components/drawer/src/drawer.vue"]]))});export{k as E,Y as __tla};
