var z=Object.create;var s=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var W=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var C=(t,o)=>{for(var n in o)s(t,n,{get:o[n],enumerable:!0})},x=(t,o,n,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of W(o))!w.call(t,l)&&l!==n&&s(t,l,{get:()=>o[l],enumerable:!(r=L(o,l))||r.enumerable});return t};var D=(t,o,n)=>(n=t!=null?z(k(t)):{},x(o||!t||!t.__esModule?s(n,"default",{value:t,enumerable:!0}):n,t)),I=t=>x(s({},"__esModule",{value:!0}),t);var R={};C(R,{default:()=>E});module.exports=I(R);var H=require("react"),i=require("@chakra-ui/react"),u=D(require("@emotion/styled"),1),e=require("react/jsx-runtime"),v=(0,u.default)(i.Text)`
  position: relative;
  width: fit-content;
  margin: 0 auto;

  &:after {
    content: '';
    border-top: 1px solid #2d3748;
    width: 100%;
    height: 1px;
    position: absolute;
    top: 50%;
    left: 0;
  }
`,F=({selected:t,onSelect:o,onUnSelect:n,domain:r,currency:l})=>{var c,d;let{name:h,availability:m,rate:A,discountedRate:p,discount:g}=r,{price:b,status:a}=m,{subTotal:{usdCents:f}}=b,V=S=>{S.stopPropagation(),n()},T=()=>{if(a==="NOT_AVAILABLE")return"Sold";if(t)return"Selected";if(!t)return"Select"},B=()=>{t?n():t||o()};return(0,e.jsx)(i.Box,{position:"relative",paddingY:2,mb:3,zIndex:"1",border:"1px solid #cccccc",borderRadius:10,flexDir:"row",children:(0,e.jsxs)(i.Flex,{paddingX:3,align:"center",justify:"space-between",flexDir:"row",children:[(0,e.jsx)(i.Text,{fontSize:14,children:h}),(0,e.jsxs)(i.Flex,{align:"center",children:[a==="AVAILABLE"&&(0,e.jsxs)(i.Box,{mr:4,children:[(0,e.jsxs)(i.Text,{textAlign:"center",fontSize:12,fontWeight:600,children:[(c=p[l])!=null?c:f/100," ",l," ",(0,e.jsxs)("span",{style:{fontWeight:600},children:["($",p.USDT,")"]})]}),g>0&&(0,e.jsxs)(i.Flex,{children:[(0,e.jsxs)(v,{textAlign:"center",fontSize:10,fontWeight:500,lineHeight:1,children:[(d=A[l])!=null?d:f/100," ",l," ",(0,e.jsxs)("span",{style:{fontWeight:400},children:["($",f/100,")"]})]}),(0,e.jsxs)(i.Text,{ml:1,textAlign:"center",fontSize:10,fontWeight:500,lineHeight:1,color:"green",children:["(",g,"% off)"]})]})]}),(0,e.jsx)(i.Button,{size:"sm",variant:"outline",bg:t?"input":"initial",minWidth:"20",onClick:B,isDisabled:a==="NOT_AVAILABLE",children:T()})]})]})})},E=F;
