import{_ as b}from"./DynamicIcon.js?ver=1.3.25";import{e as s,b as i,o as n,d as o,t as d,F as m,g as p,q as B,f as _,a as f,r as y,n as g}from"./vue.esm-bundler.js?ver=1.3.25";import{_ as P}from"./_plugin-vue_export-helper.js?ver=1.3.25";const v={name:"BundleProducts",components:{DynamicIcon:b},props:{product:{type:Object,default:()=>({})},titleKey:{type:String,default:"title"}},data(){return{showBundleProducts:!1}},computed:{bundleItems(){var e;return((e=this.product)==null?void 0:e.bundle_items)??[]}},methods:{toggleBundleProducts(){this.showBundleProducts=!this.showBundleProducts}}},I={class:"fct-bundle-products-title"},k={class:"fct-bundle-products-list"},w={class:"fct-bundle-products-more"},C={class:"fct-bundle-products-more-list"},D={class:"see-more-text"},N={class:"see-less-text"};function S(e,c,u,V,h,t){const a=y("DynamicIcon");return t.bundleItems.length?(n(),s("div",{key:0,class:g(`fct-bundle-products ${h.showBundleProducts?"show-all":""}`)},[o("h4",I,d(e.$t("Bundle Of"))+": ",1),o("div",k,[(n(!0),s(m,null,p(t.bundleItems.slice(0,2),(r,l)=>(n(),s("p",{key:l},d(r[u.titleKey]),1))),128)),o("div",w,[o("div",C,[(n(!0),s(m,null,p(t.bundleItems.slice(2),(r,l)=>(n(),s("p",{key:`more-${l}`},d(r[u.titleKey]),1))),128))])])]),t.bundleItems.length>2?(n(),s("a",{key:0,href:"#",class:"fct-see-more-btn",onClick:c[0]||(c[0]=B((...r)=>t.toggleBundleProducts&&t.toggleBundleProducts(...r),["prevent"]))},[o("span",D,[_(d(e.$t("See More"))+" ",1),f(a,{name:"ChevronDown"})]),o("span",N,[_(d(e.$t("See Less"))+" ",1),f(a,{name:"ChevronUp"})])])):i("",!0)],2)):i("",!0)}const L=P(v,[["render",S]]);export{L as B};
