1import{A as createBaseVNode,Ct as withCtx,E as Teleport,L as createVNode,M as createCommentVNode,N as createElementBlock,Qt as toDisplayString,Yt as normalizeClass,ct as renderSlot,it as openBlock,j as createBlock,k as computed,tt as onMounted,vt as watch,z as defineComponent}from"./BCI52hT3.js";import{D as Icon_default,l as Button_default}from"#entry";var _hoisted_1={key:0,class:`icn icn-set flex items-center justify-center sm:h-6 sm:w-6`},_hoisted_2={key:0,class:`font-t2 text-t2-body text-alpha-white-100 block w-full font-bold whitespace-pre-wrap`},_hoisted_3={key:1,class:`btn-wrap`},_hoisted_4={key:2,class:`btn-wrap`},Popup_vue_vue_type_script_setup_true_lang_default=defineComponent({__name:`Popup`,props:{modelValue:{type:Boolean},type:{},message:{},duration:{},closeDisabled:{type:Boolean},offset:{}},emits:[`update:modelValue`,`close`],setup(b,{emit:x}){let S=b,C=x,w=computed(()=>S.type?(Array.isArray(S.type)?S.type:S.type.split(`,`)).map(e=>e.trim()).filter(Boolean):[]),T=e=>w.value.includes(e);function E(){S.closeDisabled||(C(`update:modelValue`,!1),C(`close`))}let D=computed(()=>S.offset?.trim()||`toast-bottom`),O=null;function k(){O&&=(clearTimeout(O),null)}function A(){k(),S.duration&&S.modelValue&&(O=window.setTimeout(()=>E(),S.duration))}return onMounted(A),watch(()=>S.modelValue,A),watch(()=>S.duration,A),(_,v)=>{let y=Icon_default,x=Button_default;return openBlock(),createBlock(Teleport,{to:`body`},[b.modelValue?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`toast-template`,{active:b.modelValue}])},[createBaseVNode(`div`,{class:normalizeClass([`toast flex w-full items-center justify-between gap-2`,[D.value,T(`has-icon`)&&`has-icon`,T(`close-btn`)&&`close-btn`,T(`side-btn`)&&`side-btn`]])},[T(`has-icon`)?(openBlock(),createElementBlock(`div`,_hoisted_1,[renderSlot(_.$slots,`icon`)])):createCommentVNode(``,!0),createBaseVNode(`div`,{class:normalizeClass([`txt flex items-center`,T(`has-icon`)||T(`close-btn`)||T(`side-btn`)?`sm:w-[calc(100%-64px)]`:`w-full`])},[_.$slots.default?renderSlot(_.$slots,`default`,{},void 0,void 0,1):(openBlock(),createElementBlock(`p`,_hoisted_2,toDisplayString(b.message??`Toast message`),1))],2),T(`side-btn`)?(openBlock(),createElementBlock(`div`,_hoisted_3,[renderSlot(_.$slots,`action`)])):createCommentVNode(``,!0),T(`close-btn`)?(openBlock(),createElementBlock(`div`,_hoisted_4,[createVNode(x,{type:`button`,variant:`ghost`,padded:!1,disabled:b.closeDisabled,class:`rounded-thumb-md flex items-center justify-center p-0 focus-visible:bg-transparent active:bg-transparent sm:h-6 sm:w-6`,onClick:E},{default:withCtx(()=>[renderSlot(_.$slots,`close-icon`,{},()=>[createVNode(y,{name:`mono:toast-close`,mode:`svg`,class:`block text-white sm:h-6 sm:w-6`})])]),_:3},8,[`disabled`])])):createCommentVNode(``,!0)],2)],2)):createCommentVNode(``,!0)])}}}),Popup_default=Object.assign(Popup_vue_vue_type_script_setup_true_lang_default,{__name:`CommonToastPopup`});export{Popup_default as t};
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.