import{Box as m,Flex as i,Slider as s,SliderFilledTrack as c,SliderThumb as f,SliderTrack as S,Spinner as g,Text as o}from"@chakra-ui/react";import u from"@emotion/styled";import{LAMPORTS_PER_SOL as x}from"@solana/web3.js";import"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var b="https://docs.bonfida.org/collection/naming-service/how-to-create-a-solana-domain-name/purchasing-a-domain-name/direct-registration",p=u(i)`
  position: relative;
`,h=({size:n,setSize:r,loading:l,subTotalPrice:d})=>t(p,{paddingY:4,flexDir:"column",alignItems:"center",children:[t(s,{defaultValue:0,min:1,max:10,step:1,w:"94%",onChange:a=>{r(a)},value:n,children:[t(S,{bg:"muted",children:[e(m,{position:"relative",right:10}),e(c,{bg:"mutedForeground"})]}),e(f,{boxSize:4,borderColor:"mutedForeground",borderWidth:"1"})]}),t(i,{justifyContent:"space-between",w:"full",mt:"1",children:[e(o,{fontSize:"12",children:"1 Kb"}),e(o,{fontSize:"12",children:"10 Kb"})]}),t(i,{w:"full",justifyContent:"space-between",children:[t(o,{fontSize:14,mt:4,fontWeight:"semibold",children:["Selected Size: ",`${n} Kb`]}),e(o,{fontSize:14,mt:4,textDecoration:"underline",cursor:"pointer",onClick:()=>window.open(b),textAlign:"right",children:"How much storage is right for you?"})]}),t(i,{w:"full",justifyContent:"space-between",alignItems:"center",children:[e(o,{fontSize:14,mt:4,fontWeight:"bold",children:"Storage cost"}),t(i,{alignItems:"flex-end",justifyContent:"center",mt:4,children:[l?e(g,{size:"xs",mb:"1"}):t(o,{fontSize:14,fontWeight:"bold",children:["+",`${(d/x).toFixed(5)}`]}),e(o,{ml:"1",fontSize:14,fontWeight:"bold",children:"SOL"})]})]})]}),W=h;export{W as default};
