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