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