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