import{C as h,V as C,ak as d,r as V,q as B,N as p,D as r,E as s,P as a,Q as b,R as l,F as k,J as E,K as N,a3 as w,O as T,S as $,am as R}from"./vendor-BGtMsOoo.js";import{br as m}from"./index-CRze-aDK.js";const S={class:"rounded border bg-neutral-50 px-4 py-2"},q=["title"],O=h({__name:"configuration-items",props:{configurationItems:{},lineItemId:{},allowEdit:{type:Boolean},route:{}},setup(f){const t=f,{t:_}=C(),x=d(t,"configurationItems"),i=d(t,"lineItemId"),n=V(!0),v=B(()=>typeof t.route=="string"?{path:t.route,query:{lineItemId:i.value}}:typeof t.route=="object"?{...t.route,query:{lineItemId:i.value}}:"");function u(e){switch(e.type){case m.text:return _("shared.cart.configuration_items.selected_text",{text:e.customText??""});case m.product:return e.name??"";default:return""}}return(e,c)=>{const I=p("VcIcon"),y=p("VcButton");return s(),r("div",S,[a("button",{type:"button",class:"flex items-center gap-1 text-xs font-bold",onClick:c[0]||(c[0]=o=>n.value=!n.value)},[a("span",null,l(e.$t("shared.cart.configuration_items.title")),1),b(I,{class:"text-primary",name:n.value?"chevron-down":"chevron-up",size:"xs"},null,8,["name"])]),a("ul",{class:R(["space-y-1.5 pt-2 text-xs",{hidden:n.value}])},[(s(!0),r(k,null,E(x.value,(o,g)=>(s(),r("li",{key:o.id,class:"max-w-lg truncate",title:u(o)},l(`${g+1}. ${u(o)}`),9,q))),128)),a("li",null,[e.allowEdit?(s(),N(y,{key:0,size:"xs",to:v.value,"append-icon":"edit",variant:"outline"},{default:T(()=>[$(l(e.$t("shared.cart.configuration_items.edit_configuration")),1)]),_:1},8,["to"])):w("",!0)])],2)])}}});export{O as _};
//# sourceMappingURL=configuration-items.vue_vue_type_script_setup_true_lang-Bbu9zvgd.js.map
