1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9719],{89719:function(t,o,e){e.r(o);var c=e(11448),a=e(32790),i=e(46038),r=e(50927),d=e(68055),n=e(44797),u=e(76745),l=e(21961),p=e(70435),s=e(75689),m=e(21720),_=e(28280),y=e(31151);o.default=t=>{let{id:o,boxProps:e}=t,{userAddress:h,token:v,isLoggedIn:g}=(0,l.default)(t=>t),{data:x,isLoading:b,isError:D}=(0,u.useQuery)({queryKey:["dynamic channel detail",o],queryFn:()=>(0,_.O)(o,{location_id:h.location_id,location_ids:h.location_ids.toString(),f_active:!0,fm_product:!0,show_hub:!0})}),f=(0,a.useMemo)(()=>(null==x?void 0:x.data.data)||{title:"",products:[],category_id:[]},[null==x?void 0:x.data.data]);return((0,a.useEffect)(()=>{D&&i.cM.info("Error get dynamioc channel slotting",{customInfo:{origin:"code implementation",isLoggedIn:g,hasToken:!!v}})},[D,g,v]),b)?(0,c.jsx)(y.Z,{}):f.products.length?(0,c.jsx)(r.Z,{...e,children:(0,c.jsxs)(r.Z,{marginTop:"16px",children:[(0,c.jsxs)(r.Z,{marginBottom:"8px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px",px:"16px",children:[(0,c.jsx)(d.Z,{component:"h2",variant:"headline-default",children:f.title}),(0,c.jsx)(p.default,{prefetch:!1,href:"/d/".concat(o),children:(0,c.jsx)(d.Z,{variant:"body-smallStrong",color:n.$.textColor.link,whiteSpace:"nowrap",children:"Lihat Semua"})})]}),(0,c.jsx)(r.Z,{display:"flex",overflow:"auto",gap:"14px",className:"box-hide-scroll",px:"16px",children:f.products.map((t,o)=>{var e,a,i;return(0,c.jsx)(r.Z,{children:(0,c.jsx)(s.Z,{boxPropsContainer:{width:"110px",height:"auto"},productData:{astroCoin:t.astroCoin,productDiscountDailyQuota:t.productDiscountDailyQuota,productDiscountPercentage:t.productDiscountPercentage,productDiscountPrice:t.productDiscountPrice,productDiscountStock:t.productDiscountStock,productFavorite:t.productFavorite,productGrammationLabel:t.productGrammationLabel,productID:t.productId,productInventoryDiscountId:t.productInventoryDiscountId,productName:t.productName,productPrice:t.productPrice,productStock:t.productStock,productUrlImage:t.productUrlImage,productVolume:t.productVolume,productWeight:t.productWeight,isEighteen:t.isTwentyOne,productCategoryIds:f.category_id,productSlug:t.product_slug,inventoryDiscountTierLabel:null==t?void 0:t.inventory_discount_tier_label,productLabels:t.product_labels,locationTypeIconURL:t.location_type_icon_url,locationTypeLabelText:t.location_type_label_text,locationTypeLabelHexCode:t.location_type_label_hex_code,cartType:t.cart_type,locationId:t.location_id,closeReason:t.close_reason,disableAtc:t.disable_atc,isAds:(null==t?void 0:t.is_ads)||!1,metadataAds:null==t?void 0:null===(e=t.metadata)||void 0===e?void 0:e.ads},source:"dynamicchannel",trackerData:{eventData:{is_tagged_ads:!!(null==t?void 0:t.is_ads),eventLabel:f.title,item_list:"/".concat(m.T.RECOMMENDATION_PAGE," - product list - recommendation ").concat(f.title),items:[{item_name:t.productName,item_id:String(t.productId),price:Number(t.productPrice),item_brand:"",item_category:"",item_variant:"",quantity:t.productStock,item_category5:t.productDiscountPrice||t.productPrice||"",item_category4:"".concat(t.productInventoryDiscountId||""),promotion_id:"",item_list_id:"".concat(o),item_category3:"".concat(t.productDiscountDailyQuota||""),item_list_name:"",promotion_name:"",ad_id:(null==t?void 0:null===(i=t.metadata)||void 0===i?void 0:null===(a=i.ads)||void 0===a?void 0:a.ad_id)||""}]},eventAction:{viewProduct:"view product card - recommendation",clickProduct:"click product card - recommendation",addToCart:"click add to cart on product card - recommendation"}}})},"dynamic-channel-product-".concat(+o+1))})})]})}):null}}}]); 2//# sourceMappingURL=9719.8d15dae63b17cf67.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.