2026-10-04 11:04:33 +03:30
|
|
|
import{A as e,At as t,F as n,G as r,M as i,Nt as a,Pt as o,R as s,_ as c,c as l,d as u,f as d,g as f,h as ee,i as p,k as m,l as h,nt as g,t as _,u as v,ut as y,v as b}from"./_plugin-vue_export-helper-1xMDlcEE.js";import{r as te,u as x}from"./BasicIcon-ba1FsUKx.js";import{n as ne}from"./dist-Bc4P4ngC.js";import{o as S}from"./format-C72AoJ2H.js";import{n as C}from"./http-CU_N-R2R.js";import{c as re,d as ie,l as ae,o as oe,s as se,u as w,w as T}from"./index-CON313Q2.js";import{t as ce}from"./IconChevronBack-DytWz6TD.js";import{t as le}from"./PageSkeleton-DYdjm4l9.js";import{n as ue,r as de,t as fe}from"./crm-CgnSby61.js";import{t as pe}from"./useGoBack-B1rclh3v.js";import{t as me}from"./useTouchSwipe-C8fUyAcQ.js";import{t as he}from"./bannerLink-BW8t2Oqp.js";import{t as ge}from"./IconBookmark-CQq-TOS-.js";import{t as _e}from"./IconHeart-CvzbNH_T.js";import{n as E,t as D}from"./AddressCompletionModal-BuNBCK1j.js";import{n as O,t as k}from"./productAvailability-B5nVr_sJ.js";async function ve(){return C(`/suggestions/me`)}var ye=`/assets/level-medal-Avpe4Lqa.webp`,A=`/assets/quick-categories-grid-MFEfEUjL.webp`,be=`/assets/quick-catalog-request-Ck7EqicC.webp`,xe=`/assets/latest-order-status-CfJ1sx5U.webp`,j={class:`suggest-panel`,"aria-label":`پیشنهاد اختصاصی`},M={class:`suggest-panel__head`},N={key:0,class:`suggest-panel__empty`},P={key:1,class:`suggest-panel__row scroll-x`},F=[`onClick`],Se={key:0,class:`suggest-product__chip suggest-product__chip--oos`},I={key:1,class:`suggest-product__chip`},L=[`aria-label`,`aria-pressed`,`onClick`],R={class:`suggest-product__body`},z={class:`suggest-product__name`},B={class:`suggest-product__desc`},V={key:0,class:`suggest-product__swatches`},H={key:0,class:`suggest-product__swatch suggest-product__swatch--more`},U={class:`suggest-product__specs`},W={class:`suggest-product__spec`},G={class:`suggest-product__spec-copy`},Ce={class:`suggest-product__spec-val`},we={class:`suggest-product__spec`},K={class:`suggest-product__spec-copy`},q={class:`suggest-product__spec-val`},J=[`disabled`,`onClick`],Y=4,Te=_(b({__name:`HomeSuggestionsSection`,props:{items:{}},setup(e){let t=e,r=T(),s=ie(),{requesting:m,addressModalOpen:g,addressError:_,requestCatalog:v,submitAddressAndRequest:b,closeAddressModal:te}=E();function ne(e){return e.note?.trim()||e.subtitle?.trim()||`مشابه خریدهای قبلی شما`}function C(e){let t=e.colors?.length??0;return t>Y?t-Y:0}function ae(e){return{id:e.productId,name:e.productName,code:e.productCode,categoryId:``,season:`all_season`,widthCm:e.widthCm??0,composition:e.composition??``,colors:e.colors??(e.color?[e.color]:[]),colorImages:e.colorImages,tags:[],isNew:!!e.isNew,imageUrl:e.imageUrl,subtitle:e.subtitle,rollMeters:1,catalogName:e.catalogName,catalogCode:e.catalogCode,color:e.color,isActive:e.productIsActive!==!1}}function oe(e){r.push({path:`/product`,query:{id:e.productId}})}async function se(e){await s.toggle(e)}async function w(e){await v(ae(e))}let ce=l(()=>t.items.length>0);function le(e){return e.composition?.trim()||`—`}function ue(e){return e.widthCm?`${S(e.widthCm)} cm`:`—`}return(t,l)=>(i(),d(`section`,j,[h(`header`,M,[l[3]||=ee(`<div class="suggest-panel__titles" data-v-b0ad0afd><h3 class="suggest-panel__title" data-v-b0ad0afd><span class="suggest-panel__sparkles" aria-hidden="true" data-v-b0ad0afd><svg width="18" height="18" viewBox="0 0 24 24" fill="none" data-v-b0ad0afd><path d="M12 2l1.2 4.2L17.5 8 13.2 9.2 12 13.5 10.8 9.2 6.5 8l4.3-1.8L12 2Z" fill="#c9a227" data-v-b0ad0afd></path><path d="M19 14l.7 2.4 2.4.7-2.4.7-.7 2.4-.7-2.4-2.4-.7 2.4-.7.7-2.4Z" fill="#d4af37" data-v-b0ad0afd></path></svg></span> پیشنهادهای اختصاصی برای شما </h3><p class="suggest-panel__sub" data-v-b0ad0afd>بر اساس خریدهای قبلی و علاقهمندیهای شما</p></div>`,1),h(`button`,{type:`button`,class:`suggest-panel__all`,onClick:l[0]||=e=>y(r).push(`/products`)},[l[2]||=f(` مشاهده همه `,-1),c(re,{size:14})])]),ce.value?(i(),d(`div`,P,[(i(!0),d(p,null,n(e.items,e=>(i(),d(`article`,{key:e.id
|