var T=Object.create;var l=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var L=(t,i)=>{for(var o in i)l(t,o,{get:i[o],enumerable:!0})},d=(t,i,o,a)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of B(i))!C.call(t,r)&&r!==o&&l(t,r,{get:()=>i[r],enumerable:!(a=y(i,r))||a.enumerable});return t};var W=(t,i,o)=>(o=t!=null?T(z(t)):{},d(i||!t||!t.__esModule?l(o,"default",{value:t,enumerable:!0}):o,t)),k=t=>d(l({},"__esModule",{value:!0}),t);var I={};L(I,{default:()=>F});module.exports=k(I);var n=require("@chakra-ui/react"),g=W(require("@emotion/styled"),1),e=require("react/jsx-runtime"),w=(0,g.default)(n.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;
  }
`,D=({selected:t,onSelect:i,onUnSelect:o,domain:a,currency:r})=>{let{name:x,availability:u,rate:h,discountedRate:f,discount:p}=a,{price:m,status:s}=u,{subTotal:{usdCents:c}}=m,v=S=>{S.stopPropagation(),o()},A=()=>{if(s==="NOT_AVAILABLE")return"Sold";if(t)return"Selected";if(!t)return"Select"},b=()=>{t?o():t||i()};return(0,e.jsx)(n.Box,{position:"relative",paddingY:2,mb:3,zIndex:"1",border:"1px solid #cccccc",borderRadius:10,flexDir:"row",children:(0,e.jsxs)(n.Flex,{paddingX:3,align:"center",justify:"space-between",flexDir:"row",children:[(0,e.jsx)(n.Text,{fontSize:14,children:x}),(0,e.jsxs)(n.Flex,{align:"center",children:[s==="AVAILABLE"&&(0,e.jsxs)(n.Box,{mr:4,children:[(0,e.jsxs)(n.Text,{textAlign:"center",fontSize:12,fontWeight:600,children:[f[r]??c/100," ",r," ",(0,e.jsxs)("span",{style:{fontWeight:600},children:["($",f.USDT,")"]})]}),p>0&&(0,e.jsxs)(n.Flex,{children:[(0,e.jsxs)(w,{textAlign:"center",fontSize:10,fontWeight:500,lineHeight:1,children:[h[r]??c/100," ",r," ",(0,e.jsxs)("span",{style:{fontWeight:400},children:["($",c/100,")"]})]}),(0,e.jsxs)(n.Text,{ml:1,textAlign:"center",fontSize:10,fontWeight:500,lineHeight:1,color:"green",children:["(",p,"% off)"]})]})]}),(0,e.jsx)(n.Button,{size:"sm",variant:"outline",bg:t?"input":"initial",minWidth:24,onClick:b,isDisabled:s==="NOT_AVAILABLE",children:A()})]})]})})},F=D;
