import{d as l,r,Z as s,c as n}from"./index.8f93de0e.js";import{A as h}from"./index.038430de.js";var p=l({name:"o-action-sheet",props:{show:{type:Boolean,default:!1},actions:{type:Array,required:!0,default:()=>[]},cancelText:{type:String,default:"\u53D6\u6D88"},teleport:{type:[String,Element],default:""}},emits:["update:show","select"],setup(t,{emit:a}){const o=r({oPopover:t.show}),c=e=>{a("select",e),a("update:show",!1)};return s(()=>o.oPopover,()=>{a("update:show",o.oPopover)}),s(()=>t.show,()=>{o.oPopover=t.show}),()=>n(h,{show:o.oPopover,"onUpdate:show":e=>o.oPopover=e,teleport:t.teleport},{default:()=>[n("div",{class:["van-sheet_content van-hairline--bottom"]},[t.actions.map(e=>n("div",{class:["van-sheet-item",e.selected&&"van-sheet-item-active"],onClick:()=>c(e)},[e.name]))]),n("button",{type:"button",class:"van-action-sheet__cancel van-action-sheet_bottom__cancel",onClick:()=>a("update:show",!1)},[t.cancelText])]})}});export{p as O};
