var B=Object.create;var s=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var k=(t,o)=>{for(var n in o)s(t,n,{get:o[n],enumerable:!0})},c=(t,o,n,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of z(o))!W.call(t,l)&&l!==n&&s(t,l,{get:()=>o[l],enumerable:!(r=S(o,l))||r.enumerable});return t};var w=(t,o,n)=>(n=t!=null?B(L(t)):{},c(o||!t||!t.__esModule?s(n,"default",{value:t,enumerable:!0}):n,t)),C=t=>c(s({},"__esModule",{value:!0}),t);var F={};k(F,{default:()=>v});module.exports=C(F);var V=require("react"),i=require("@chakra-ui/react"),d=w(require("@emotion/styled"),1),e=require("react/jsx-runtime"),D=(0,d.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;
  }
`,I=({selected:t,onSelect:o,onUnSelect:n,domain:r,currency:l})=>{let{name:x,availability:u,rate:h,discountedRate:p,discount:g}=r,{price:m,status:a}=u,{subTotal:{usdCents:f}}=m,E=T=>{T.stopPropagation(),n()},A=()=>{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:x}),(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:[p[l]??f/100," ",l," ",(0,e.jsxs)("span",{style:{fontWeight:600},children:["($",p.USDT,")"]})]}),g>0&&(0,e.jsxs)(i.Flex,{children:[(0,e.jsxs)(D,{textAlign:"center",fontSize:10,fontWeight:500,lineHeight:1,children:[h[l]??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:A()})]})]})})},v=I;
