| 1 |
import{_ as B}from"./DynamicIcon.js?ver=1.7.0";import{j as s,l as i,v as n,A as o,B as l,F as m,C as p,D as y,E as _,G as h,y as b,q as g}from"./vue.esm-bundler.js?ver=1.7.0";import{_ as v}from"./_plugin-vue_export-helper.js?ver=1.7.0";const P={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,d,u,V,f,t){const a=b("DynamicIcon");return t.bundleItems.length?(n(),s("div",{key:0,class:g(`fct-bundle-products ${f.showBundleProducts?"show-all":""}`)},[o("h4",I,l(e.$t("Bundle Of"))+": ",1),o("div",k,[(n(!0),s(m,null,p(t.bundleItems.slice(0,2),(r,c)=>(n(),s("p",{key:c},l(r[u.titleKey]),1))),128)),o("div",w,[o("div",C,[(n(!0),s(m,null,p(t.bundleItems.slice(2),(r,c)=>(n(),s("p",{key:`more-${c}`},l(r[u.titleKey]),1))),128))])])]),t.bundleItems.length>2?(n(),s("a",{key:0,href:"#",class:"fct-see-more-btn",onClick:d[0]||(d[0]=y((...r)=>t.toggleBundleProducts&&t.toggleBundleProducts(...r),["prevent"]))},[o("span",D,[_(l(e.$t("See More"))+" ",1),h(a,{name:"ChevronDown"})]),o("span",N,[_(l(e.$t("See Less"))+" ",1),h(a,{name:"ChevronUp"})])])):i("",!0)],2)):i("",!0)}const E=v(P,[["render",S]]);export{E as B}; |