var v=Object.create;var x=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var M=(e,o)=>{for(var n in o)x(e,n,{get:o[n],enumerable:!0})},z=(e,o,n,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of D(o))!E.call(e,r)&&r!==n&&x(e,r,{get:()=>o[r],enumerable:!(t=R(o,r))||t.enumerable});return e};var y=(e,o,n)=>(n=e!=null?v(W(e)):{},z(o||!e||!e.__esModule?x(n,"default",{value:e,enumerable:!0}):n,e)),j=e=>z(x({},"__esModule",{value:!0}),e);var L={};M(L,{default:()=>K});module.exports=j(L);var l=require("@chakra-ui/react"),$=y(require("@emotion/styled"),1),oe=require("react");var a=require("react"),g=y(require("@emotion/styled"),1),b=require("@chakra-ui/icons"),u=require("@chakra-ui/react");var F=y(require("react"),1),i=require("@chakra-ui/react"),T=require("@chakra-ui/anatomy"),c=require("react/jsx-runtime"),S=F.default.forwardRef(({label:e,error:o,placeholder:n,helperText:t,isInvalid:r,as:f=i.Input,InputLeftAddon:p,InputRightAddon:C,...h},I)=>{let{disabled:m}=h;return(0,c.jsxs)(i.FormControl,{isInvalid:r,opacity:m?.4:1,children:[e&&(0,c.jsx)(i.Text,{color:r?"destructive":"foreground",fontWeight:"medium",fontSize:"sm",lineHeight:1,children:e}),(0,c.jsxs)(i.InputGroup,{mt:"2",children:[p,(0,c.jsx)(f,{variant:"",placeholder:n,...h,ref:I}),C]}),t&&(0,c.jsx)(i.Text,{fontSize:"xs",mt:2,color:"mutedForeground",children:t}),r&&o&&(0,c.jsx)(i.Text,{fontSize:"xs",mt:2,color:"destructive",children:o})]})}),{definePartsStyle:k,defineMultiStyleConfig:A}=(0,i.createMultiStyleConfigHelpers)(T.inputAnatomy.keys),G=k({field:{color:"foreground",background:"background",boxShadow:"base",borderWidth:"1px",borderStyle:"solid",borderColor:"input",borderRadius:"lg",_focusVisible:{borderColor:"ring"},_hover:{},_disabled:{opacity:1},_placeholder:{color:"mutedForeground"}}}),H=(0,i.defineStyle)({borderRadius:"md"}),V={sm:k({field:H})},Q=A({baseStyle:G,sizes:V});var s=require("react/jsx-runtime"),q=(0,g.default)(u.Box)`
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px;
  height: 40px;
  border-radius: 12px;
`,B=(0,g.default)(u.Button)`
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  height: 32px;
  width: 32px;
  //border-radius: 12px;
  //border: none;
  //border: 1px solid ${e=>e.theme.colors.border};
  pointer-events: ${e=>e.disabled?"none":"unset"};
  opacity: ${e=>e.disabled?"0.5":"1"};

  &:active {
    border: 1px solid ${e=>e.theme.colors.foreground};
  }

  svg {
    path {
      fill: ${e=>e.theme.colors.foreground};
    }
  }
`,N=(0,g.default)(S)`
  justify-content: center;
  font-size: 18px;
  min-width: 60px;
  user-select: none;
  border: none;
  box-shadow: none;
  max-width: 80px;
  text-align: center;
`,P=({initialState:e=1,maxState:o,onChange:n,value:t,onError:r})=>{let[f,p]=(0,a.useState)(e);return(0,a.useEffect)(()=>{n(f)},[f]),(0,a.useEffect)(()=>{p(e)},[e]),(0,a.useEffect)(()=>{o>0&&t>o||f<1?r(!0):r(!1)},[o,t,f]),(0,s.jsxs)(u.Flex,{flexDirection:"column",alignItems:"flex-end",children:[(0,s.jsxs)(q,{children:[(0,s.jsx)(B,{variant:"outline",onClick:()=>{t>e&&p(m=>t-1)},disabled:t===1,children:(0,s.jsx)(b.MinusIcon,{})}),(0,s.jsx)(N,{value:t,onChange:m=>{let w=Number(m.target.value);p(w)}}),(0,s.jsx)(B,{variant:"outline",onClick:()=>{o?t<o&&p(m=>t+1):p(m=>t+1)},disabled:o===t||!o,children:(0,s.jsx)(b.AddIcon,{})})]}),(o>0&&t>o||f<1)&&(0,s.jsxs)(u.Text,{fontSize:12,mt:10,color:"#E11900",children:["Enter quantity between 1 to ",o]})]})},_=P;var d=require("react/jsx-runtime"),Y=(0,$.default)(l.Flex)`
  position: relative;
`,J=({duration:e,setDuration:o,loading:n,subTotalPrice:t,payUsing:r})=>(0,d.jsxs)(Y,{paddingY:4,flexDir:"column",alignItems:"center",children:[(0,d.jsx)(_,{initialState:1,maxState:1e4,onChange:o,onError:()=>{},value:e}),(0,d.jsxs)(l.Flex,{w:"full",justifyContent:"space-between",alignItems:"center",children:[(0,d.jsx)(l.Text,{fontSize:14,mt:4,fontWeight:"bold",children:`${e} year registration`}),(0,d.jsxs)(l.Flex,{alignItems:"flex-end",justifyContent:"center",mt:4,children:[n?(0,d.jsx)(l.Spinner,{size:"xs",mb:"1.5"}):(0,d.jsx)(l.Text,{fontSize:14,fontWeight:"bold",children:`${t?.toFixed(5)}`}),(0,d.jsx)(l.Text,{ml:"1",fontSize:14,fontWeight:"bold",children:r?.ticker})]})]})]}),K=J;
