import{r as e,t}from"./jsx-runtime-BbTa8W_M-1776590214964.js";import{t as n}from"./useTranslation-D1etqd9u-1776590214964.js";import{t as r}from"./loader-circle-BF-wgoyu-1776590214964.js";import{t as i}from"./shopping-cart-BNd72lH--1776590214964.js";import{t as a}from"./store-CIvuFgNB-1776590214964.js";import{t as o}from"./button-WiAFyHfP-1776590214964.js";e();var s=t();function c({isOwner:e,product:t,handleStartOrder:c,handleAddToCart:l,addingToCart:u}){let{t:d}=n();return e?(0,s.jsx)(`div`,{className:`mt-auto pt-6 border-t`,children:(0,s.jsxs)(`div`,{className:`w-full bg-primary/10 text-primary border border-primary/20 rounded-xl p-3 text-center text-sm font-bold flex items-center justify-center gap-2`,children:[(0,s.jsx)(a,{className:`w-4 h-4`}),` `,d(`You own this product`)]})}):(0,s.jsxs)(`div`,{className:`mt-auto pt-6 border-t grid grid-cols-1 sm:grid-cols-2 gap-3`,children:[(0,s.jsx)(o,{size:`lg`,onClick:c,disabled:t.stock===0,className:`bg-orange-500 hover:bg-orange-600 text-white rounded-xl text-base font-bold shadow-md shadow-orange-500/20 active:scale-[0.98] transition-all`,children:d(`Buy Now`)}),(0,s.jsxs)(o,{size:`lg`,variant:`outline`,onClick:l,disabled:u||t.stock===0,className:`rounded-xl text-base font-bold gap-2 border-primary/50 text-primary hover:bg-primary/5 active:scale-[0.98] transition-all`,children:[u?(0,s.jsx)(r,{className:`w-5 h-5 animate-spin`}):(0,s.jsx)(i,{className:`w-5 h-5`}),d(`Add to Cart`)]})]})}export{c as default};