import{n as g,u as i}from"./EjfTbOfY.js";import{e as _,g as u,o as m,c as I,a as l,t as h,i as r,f as b,r as w}from"./BQNCEBYD.js";const y={id:"product-carousel",class:"section !h-640px"},B={class:"carousel-item-bg","h-full":"","w-full":"",flex:"~ col items-center","pt-236px":"","text-hex-ebf1ff1a":""},L={text:"52px hex-EBF1FF",class:"text-shodow"},v=["innerHTML"],C=_({name:"ProductListCarousel",__name:"carousel-list",props:{pageInfo:null},setup(t){const d=t,{pageInfo:o}=u(d);return(a,c)=>(m(),I("div",y,[l("div",B,[l("div",L,h(r(o)?.title||r(o)?.titleCn),1),c[0]||(c[0]=l("div",{class:"mark","mt-39px":"","h-1px":"","w-60px":"","bg-hex-fff":""},null,-1)),l("div",{"mt-26px":"",text:"28px hex-EBF1FF90 center","lh-36px":"",innerHTML:("nl2br"in a?a.nl2br:r(g))(r(o)?.content||r(o)?.description||"")},null,8,v)])]))}}),$=Object.assign(C,{__name:"ProductCarouselList"}),z=b("productStore",()=>{const t=w({info:null,index:[],listsId:0,listsInfo:null,lists:{records:[],total:0,size:10,current:1,orders:[],pages:0},detail:{}}),d=async()=>{const s=await i.$get("/client/product/productBanner");return s&&(t.info=s),s},o=async()=>{const s=await i.$get("/client/product/productList");return s&&(t.index=s),s},a=s=>{t.listsId=s},c=async s=>{if(t.listsId===s&&t.listsInfo)return t.listsInfo;const e=await i.$get("/client/product/categoryInfo",{categoryId:s});return e&&(t.listsInfo=e),e},p=async(s,e=1,x=10)=>{const n=await i.$post("/client/product/listByCategory",{},{body:{categoryId:s,currPage:e,pageSize:x}});return n&&(t.listsId!==s||e===1?(t.listsId=s,t.lists=n):(t.lists.records.push(...n.records),t.lists.total=n.total,t.lists.size=n.size,t.lists.current=n.current,t.lists.orders=n.orders,t.lists.pages=n.pages)),n},f=async s=>{const e=await i.$get("/client/product/productDetail",{productId:s});return e&&(t.detail[s]=e),e};return{...u(t),getInfo:d,getIndex:o,setCategoryId:a,getListsInfo:c,getLists:p,getDetail:f}});export{$ as _,z as u};
