var $=Object.create;var g=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var E=(e,o)=>{for(var n in o)g(e,n,{get:o[n],enumerable:!0})},F=(e,o,n,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of D(o))!P.call(e,r)&&r!==n&&g(e,r,{get:()=>o[r],enumerable:!(t=v(o,r))||t.enumerable});return e};var y=(e,o,n)=>(n=e!=null?$(W(e)):{},F(o||!e||!e.__esModule?g(n,"default",{value:e,enumerable:!0}):n,e)),M=e=>F(g({},"__esModule",{value:!0}),e);var K={};E(K,{default:()=>J});module.exports=M(K);var l=require("@chakra-ui/react"),_=y(require("@emotion/styled"),1);var m=require("react"),b=y(require("@emotion/styled"),1),x=require("@chakra-ui/icons"),u=require("@chakra-ui/react");var T=y(require("react"),1),i=require("@chakra-ui/react"),z=require("@chakra-ui/anatomy"),c=require("react/jsx-runtime"),S=T.default.forwardRef(({label:e,error:o,placeholder:n,helperText:t,isInvalid:r,as:p=i.Input,InputLeftAddon:f,InputRightAddon:C,...h},I)=>{let{disabled:a}=h;return(0,c.jsxs)(i.FormControl,{isInvalid:r,opacity:a?.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:[f,(0,c.jsx)(p,{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:j}=(0,i.createMultiStyleConfigHelpers)(z.inputAnatomy.keys),A=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"}}}),G=(0,i.defineStyle)({borderRadius:"md"}),H={sm:k({field:G})},O=j({baseStyle:A,sizes:H});var s=require("react/jsx-runtime"),V=(0,b.default)(u.Box)`
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px;
  height: 40px;
  border-radius: 12px;
`,B=(0,b.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};
    }
  }
`,q=(0,b.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;
`,N=({initialState:e=1,maxState:o,onChange:n,value:t,onError:r})=>{let[p,f]=(0,m.useState)(e);return(0,m.useEffect)(()=>{n(p)},[p]),(0,m.useEffect)(()=>{f(e)},[e]),(0,m.useEffect)(()=>{o>0&&t>o||p<1?r(!0):r(!1)},[o,t,p]),(0,s.jsxs)(u.Flex,{flexDirection:"column",alignItems:"flex-end",children:[(0,s.jsxs)(V,{children:[(0,s.jsx)(B,{variant:"outline",onClick:()=>{t>e&&f(a=>t-1)},disabled:t===1,children:(0,s.jsx)(x.MinusIcon,{})}),(0,s.jsx)(q,{value:t,onChange:a=>{let w=Number(a.target.value);f(w)}}),(0,s.jsx)(B,{variant:"outline",onClick:()=>{o?t<o&&f(a=>t+1):f(a=>t+1)},disabled:o===t||!o,children:(0,s.jsx)(x.AddIcon,{})})]}),(o>0&&t>o||p<1)&&(0,s.jsxs)(u.Text,{fontSize:12,mt:10,color:"#E11900",children:["Enter quantity between 1 to ",o]})]})},R=N;var d=require("react/jsx-runtime"),U=(0,_.default)(l.Flex)`
  position: relative;
`,Y=({duration:e,setDuration:o,loading:n,subTotalPrice:t,payUsing:r})=>(0,d.jsxs)(U,{paddingY:4,flexDir:"column",alignItems:"center",children:[(0,d.jsx)(R,{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})]})]})]}),J=Y;
