1import{_ as K,D as Y,b as H,u as J,z as Q,C as W,r as F,H as j,c as o,d as r,e as t,F as w,m,k as i,n as c,g as l,t as d,p as S,K as y,I as z,J as _,f as X,j as A,a2 as Z,L as ee}from"./B2zKXTBA.js";import{N as te,F as oe,G as le}from"./qMY4fZTP.js";import{g as re}from"./CGUmEm0-.js";import{S as se,a as ne}from"./dI2MIuqT.js";/* empty css *//* empty css *//* empty css */import{d as ae}from"./EbjQvVL7.js";import{u as ie}from"./DzZpQlCu.js";import{u as ce}from"./CvHlSjEk.js";import{u as de}from"./CYpY1rdy.js";import"./DVM2JZjn.js";const ue={class:"relative w-full"},pe={key:0,class:"animate-pulse overflow-hidden w-full pb-[10px]"},xe={key:0,class:"flex gap-3 mb-4"},fe={class:"flex gap-[16px] overflow-hidden w-full mt-2"},he={key:2,class:"flex gap-3 mb-4"},we=["onClick"],me=["onClick"],ye={class:"relative bg-white w-full h-full",style:{"align-items":"center","justify-items":"center"}},_e={key:0},be={class:"w-[158px] h-[158px] md:w-[173px] md:h-[173px] xl:w-[268px] xl:h-[268px] flex items-center justify-center overflow-hidden mx-auto"},ge=["src","alt"],ve={key:1,class:"absolute inset-0 bg-black/70 flex items-center justify-center cursor-pointer"},ke={class:"text-white text-xl font-bold"},Ce={class:"absolute bottom-[2px] xl:bottom-[4px] left-[2px] xl:left-[4px] flex gap-[2px]"},je={key:0,class:"cursor-pointer text-white transition-all duration-200 flex items-center justify-center overflow-hidden h-[26px] w-[26px]"},Se=["src"],Ne={key:1,class:"h-[26px] w-[28px] flex items-center justify-center overflow-hidden"},Ie=["src"],Be={key:2,class:"cursor-pointer text-white transition-all duration-200 flex items-center justify-center overflow-hidden h-[26px] w-[28px]"},Te=["src"],$e=["onClick"],Le={class:"!text-[16px] hidden md:block max-w-0 opacity-0 scale-90 group-hover:max-w-[150px] group-hover:opacity-100 group-hover:scale-100 transition-all duration-100 ease-in-out whitespace-nowrap overflow-hidden"},Fe={class:"!text-[16px] absolute opacity-0 group-hover:opacity-100 transition-opacity duration-100 whitespace-nowrap"},ze={class:"p-4 flex-grow flex flex-col justify-between"},Ae={class:""},Pe={key:0},qe={key:1},De={key:0},Me={__name:"Slideitem2",props:{productlist:{type:[Array,Object],required:!0},href:{type:String},title:{type:String,default:""},counter:{type:Object,required:!0},modules:{type:Array,default:()=>[]},category:{type:Boolean,default:!1},head:{type:Boolean,default:!1},underline:{type:Boolean,default:!1}},setup(u){const N=Y(),P=H("auth_token"),q=ie(),D=ce(),a=J(),{locale:M}=Q(),I=W(),B=de(),p=u,b=F(!1),V=n=>{setTimeout(()=>{b.value=!0},100)},h=j(()=>!Array.isArray(p.productlist)),T=j(()=>h.value?Object.keys(p.productlist):[]),g=F(T.value[0]||null),$=j(()=>h.value?p.productlist[g.value]||[]:p.productlist),x=n=>B.getButtonTypeForNormalCard(n);async function O(n){await B.clearPayload(),I.push(n)}const v=n=>Number(n).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});async function R(n){if(P.value)await D.setAddToCart(n);else return q.open(),null}function G(n){let s=N.query.status_product||p.title||"";s==="สิà¸à¸à¹à¸²à¸¡à¸²à¹à¸«à¸¡à¹"?s="สิà¸à¸à¹à¸²à¹à¸«à¸¡à¹":s==="à¸à¸£à¸µà¸à¸à¹à¸à¸à¸£à¹à¸à¸±à¸à¸ªà¹à¸à¹à¸ 7 - 14 วัà¸"&&(s="สิà¸à¸à¹à¸²à¸à¸£à¸µà¸à¸à¹à¸à¸à¸£à¹");const k=re(n.name,n.id),f={},e=N.query.category_id||"";e&&(f.category_id=e),s&&(f.status_product=s),I.push({path:`/products/${k}`,query:f}).then(()=>{location.reload()})}const U=()=>{window.open("https://page.line.me/scghomeboon.ub","_blank")};return(n,s)=>{const k=ee,f=Z;return o(),r("div",ue,[b.value?i("",!0):(o(),r("div",pe,[s[1]||(s[1]=t("span",{class:"flex justify-between items-center pt-[8px] md:pt-[10px] lg:pt-[5px] xl:pt-[1px] mb-2"},[t("div",{class:"h-6 md:h-[44px] w-24 md:w-32 xl:w-[144px] bg-gray-200"}),t("div",{class:"h-4 md:h-6 w-16 md:w-[98px] bg-gray-200"})],-1)),s[2]||(s[2]=t("hr",{class:"h-[1px] mb-4 w-full bg-gray-200 border-none"},null,-1)),h.value?(o(),r("div",xe,[(o(),r(w,null,m(3,e=>t("div",{key:"tab-skel-"+e,class:"h-8 w-20 bg-gray-200"})),64))])):i("",!0),t("div",fe,[(o(),r(w,null,m(6,e=>t("div",{key:"card-skel-"+e,class:"flex-shrink-0 bg-gray-200 w-[158px] h-[296px] md:w-[173px] md:h-[311px] xl:w-[268px] xl:h-[412px]"})),64))]),s[3]||(s[3]=t("div",{class:"hidden xl:flex justify-center mt-6 xl:mt-8 pb-4"},[t("div",{class:"h-2 w-[144px] bg-gray-200"})],-1))])),t("div",{class:_(b.value?"relative opacity-100 visible transition-opacity duration-300":"absolute top-0 left-0 w-full opacity-0 invisible pointer-events-none")},[u.head?(o(),r("span",{key:0,class:"flex justify-between items-center pt-[8px] md:pt-[10px] lg:pt-[5px] xl:pt-[1px] font-bold",style:c({borderColor:l(a).divider_color})}
1,[t("h2",{class:"!text-[16px] md:!text-[18px] xl:!text-[32px]",style:c({color:l(a).color})},d(u.title),5),u.href?(o(),S(k,{key:0,to:u.href,onClick:s[0]||(s[0]=e=>O(u.href)),class:"text-blue-500 underline text-[14px] pt-[5px] md:text-[16px] md:pt-[8px] lg:pt-[10px] font-bold underline-offset-6",style:c({color:l(a).color})},{default:y(()=>[z(d(n.$t("view_all_products")),1)]),_:1},8,["to","style"])):i("",!0)],4)):i("",!0),u.underline?(o(),r("hr",{key:1,class:"h-[1px] mt-2 w-full",style:c({borderColor:l(a).underline_color})},null,4)):i("",!0),h.value?(o(),r("div",he,[(o(!0),r(w,null,m(T.value,e=>(o(),r("button",{key:e,onClick:C=>g.value=e,class:_(["px-4 py-1 border hover:bg-gray-100",{"bg-blue-100":e===g.value}])},d(e),11,we))),128))])):i("",!0),X(f,null,{default:y(()=>[$.value?(o(),S(l(se),{key:0,onSwiper:V,modules:u.modules,pagination:{el:".swiper-pagination",clickable:!0},slidesPerView:"auto",spaceBetween:16,"slides-per-group":2,class:"mySwiper"},{default:y(()=>[(o(!0),r(w,null,m($.value.slice(0,20),e=>(o(),S(l(ne),{key:e.id,class:"mt-10 !w-[158px] !h-[296px] md:!w-[173px] md:!h-[311px] xl:!w-[268px] xl:!h-[412px] shadow hover:shadow-md overflow-hidden rounded-lg"},{default:y(()=>{var C,L;return[t("div",null,[t("div",{onClick:E=>G(e),class:"block relative overflow-hidden w-full bg-gray-100 cursor-pointer"},[t("div",ye,[x(e)!=="contact_staff"?(o(),r("div",_e,[t("div",{class:_(["absolute top-[2px] left-[2px] xl:top-1 xl:left-1 text-[10px] md:text-sm font-bold px-2 py-1 rounded z-10",{invisible:e.discount_percent==="0%"}]),style:c({backgroundColor:l(a).discount_bg,color:l(a).discount_text})}," - "+d(e.discount_percent),7)])):i("",!0),t("div",be,[t("img",{src:(C=e.original_path)!=null&&C[0]?e.original_path[0]:(L=e.images_URL)!=null&&L[0]?e.images_URL[0]:l(ae),alt:e.name,class:"max-w-full max-h-full object-contain",style:{"object-fit":"contain","aspect-ratio":"1 / 1"}},null,8,ge)]),e.stock<=0?(o(),r("div",ve,[t("span",ke,d(n.$t("out_of_stock")),1)])):i("",!0),t("div",Ce,[(e==null?void 0:e.message_status)==="new"?(o(),r("div",je,[t("img",{src:l(te),alt:"NewIcon",style:{width:"26px",height:"26px"}},null,8,Se)])):i("",!0),Number(e==null?void 0:e.sold)>0?(o(),r("div",Ne,[t("img",{src:l(oe),alt:"FireIcon",class:"w-full h-full object-cover"},null,8,Ie)])):i("",!0),(e==null?void 0:e.get_free_product)=="Y"?(o(),r("div",Be,[t("img",{src:l(le),alt:"GiftIcon",class:"w-full h-full object-cover"},null,8,Te)])):i("",!0)]),x(e)==="add_to_cart"?(o(),r("button",{key:2,onClick:A(E=>R(e),["stop"]),style:c({backgroundColor:l(a).color}),class:"absolute bottom-[8px] right-[8px] cursor-pointer text-white shadow transition-all duration-200 flex items-center justify-center overflow-hidden group h-[28px] min-w-[28px] md:h-[36px] md:min-w-[36px] xl:h-[40px] xl:min-w-[40px] px-[6px] xl:px-[10px] rounded-full"},[s[4]||(s[4]=t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"3",stroke:"currentColor",class:"w-4 h-4 md:w-5 md:h-5 text-white"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1)),t("span",Le,d(n.$t("add_product")),1)],12,$e)):x(e)==="contact_staff"?(o(),r("button",{key:3,onClick:A(U,["stop"]),style:c({backgroundColor:l(a).color}),class:"absolute bottom-2 right-2 text-white shadow flex items-center justify-center cursor-pointer overflow-hidden group transition-all duration-100 ease-in-out hover:w-[130px] w-[28px] h-[28px] md:h-[36px] md:min-w-[36px] xl:h-[40px] xl:min-w-[40px] px-[6px] xl:px-[10px] rounded-full"},[s[5]||(s[5]=t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"3",stroke:"currentColor",class:"w-4 h-4 md:w-5 md:h-5 text-white transition-opacity duration-100 group-hover:opacity-0"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1)),t("span",Fe,d(n.$t("contact_shop")),1)],4)):i("",!0)])],8,me),t("div",ze,[t("p",{class:"mb-2 text-xs md:text-sm font-medium overflow-hidden text-ellipsis leading-[24px] xl:leading-[26px] line-clamp-2 min-h-[55px] max-xl:min-h-[50px] max-md:min-h-[40px]",style:c({color:l(a).black})},[(e==null?void 0:e.bundle_deal)==="Y"?(o(),r("span",{key:0,class:"md:inline-flex xl:inline-flex inline-block text-[10px] font-bold items-center justify-center w-[91px] h-[22px] rounded-full text-white align-text-bottom",style:c({background:`linear-gradient(150deg, ${l(a).bundle_color1}, ${l(a).bundle_color2})`})},[t("span",Ae,d(n.$t("Exclusive_Deal")),1)],4)):i("",!0),z(" "+d(l(M)==="th"?e.name:e.name_en||e.name),1)],4),e.vat_default!=="yes"?(o(),r("div",Pe,[t("p",{style:c({color:Number(e.fake_price)>Number(e.real_price)?l(a).price_red:l(a).black}),class:"capitalize font-semibold text-[16px] xl:text-[18px] mb-2"}," ฿"+d(v(e.real_price)),5),t("p",{style:c({color:l(a).main_gray_cl}),class:_(["capitalize line-through text-[12px] xl:text-sm",Number(e.fake_price)>Number(e.real_price)?"":"invisible"])}," ฿"+d(v(e.fake_price)),7)])):e.vat_default==="yes"?(o(),r("div",qe,[x(e)!=="contact_staff"&&x(e)!=="out_of_stock"?(o(),r("div",De,[t("p",{style:c({color:Number(e.fake_price)>Number(e.net_price)?l(a).price_red:l(a).black}),class:"capitalize font-semibold text-[16px] xl:text-[18px] mb-2"}," ฿"+d(v(e.net_price)),5)])):i("",!0)])):i("",!0)])])]}),_:2},1024))),128)),s[6]||(s[6]=t("div",{class:"swiper-pagination best-swiper hidden xl:block"},null,-1))]),_:1},8,["modules"])):i("",!0)]),_:1})],2)])}}},Xe=K(Me,[["__scopeId","data-v-eb068919"]]);export{Xe as default};
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.