import{a as c,j as e,i as n,L as x,B as o}from"./index-7c7a558c.js";import{c as m}from"./productApi-2a3da157.js";const h=()=>{var t,d,i;const{data:s,isLoading:l}=c("getAllDigitalProduct",()=>m());return e.jsx("div",{className:"",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsx("h1",{className:"text-white text-2xl mt-10 mb-7 text-center py-2 rounded-t-md bg-gradient-to-r from-[#070c44] to-[#422e9d]",children:"Our Product"}),l&&e.jsx("div",{className:"text-center flex justify-center items-center my-6",children:e.jsx(n,{color:"black",size:"lg",variant:"dots"})}),!l&((t=s==null?void 0:s.data)==null?void 0:t.all_products.length)>0?e.jsx("div",{className:" grid lg:grid-cols-4 sm:grid-cols-2 gap-8 ",children:(d=s==null?void 0:s.data)==null?void 0:d.all_products.map((a,r)=>e.jsx(x,{to:`${a.id}`,children:e.jsxs("div",{className:" bg-slate-800  bg-white shadow-md rounded-b-md",children:[e.jsx("div",{className:"card-image",children:e.jsx("img",{className:"w-full h-[300px] rounded-t-md",src:`${o}/${a.main_image}`,alt:""})}),e.jsxs("div",{className:"px-5 py-3 -ml-5 pl-8",children:[e.jsx("h5",{className:"text-xl font-medium line-clamp-1 text-[#422e9d]",children:a.product_name}),e.jsxs("p",{className:"flex justify-between text-xl font-Roboto text-red-600",children:[a.discount_price?e.jsxs("del",{children:["৳ ",a.price]}):`৳ ${a.price}`," ","৳",a.discount_price]})]})]})},r))}):null,!l&((i=s==null?void 0:s.data)==null?void 0:i.all_products.length)==0?"Product Not Found":null]})})};export{h as default};
