import{Box as d,Flex as i,Slider as s,SliderFilledTrack as m,SliderThumb as c,SliderTrack as f,Spinner as u,Text as o}from"@chakra-ui/react";import S from"@emotion/styled";import{LAMPORTS_PER_SOL as g}from"@solana/web3.js";import{jsx as e,jsxs as t}from"react/jsx-runtime";var x="https://docs.bonfida.org/collection/naming-service/how-to-create-a-solana-domain-name/purchasing-a-domain-name/direct-registration",b=S(i)`
  position: relative;
`,p=({size:n,setSize:r,loading:l,subTotalPrice:a})=>t(b,{paddingY:4,flexDir:"column",alignItems:"center",children:[t(s,{defaultValue:0,min:1,max:10,step:1,w:"94%",onChange:r,value:n,children:[t(f,{bg:"muted",children:[e(d,{position:"relative",right:10}),e(m,{bg:"mutedForeground"})]}),e(c,{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(x),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(u,{size:"xs",mb:"1"}):t(o,{fontSize:14,fontWeight:"bold",children:["+",`${(a/g).toFixed(5)}`]}),e(o,{ml:"1",fontSize:14,fontWeight:"bold",children:"SOL"})]})]})]}),w=p;export{w as default};
