import{a as e,n as t}from"./chunk-BneVvdWh.js";import{t as n}from"./react-C7IZe2D1.js";import{ht as r,t as i}from"./dist-DtfJeYQK.js";import{t as a}from"./jsx-runtime-C2wGStra.js";import{C as o,E as s,T as c,_ as l,w as u}from"./iframe-D-oZzXNK.js";import{n as d,t as f}from"./dist-Cc1j9Pjk.js";import{o as p,r as m}from"./lib-8ue2PVWI.js";import{a as h,i as g,n as _,r as v}from"./Slider-C-KoI6Ss.js";var y,b,x,S=t((()=>{y=e(n(),1),l(),h(),i(),f(),m(),v(),b=a(),x=(0,y.forwardRef)(function({value:e,defaultValue:t=[0,100],onValueChange:n,onValueCommit:i,min:a=0,max:l=100,step:f=1,minStepsBetweenThumbs:m=0,dataset:h,"aria-label":v,...y},x){let{formatMessage:S}=p(),C=r(h,{preplyDsComponent:d.Slider}),w=n?e=>n([e[0],e[1]]):void 0,T=i?e=>i([e[0],e[1]]):void 0;return(0,b.jsxs)(u,{ref:x,...C,className:g.root,value:e,defaultValue:t,onValueChange:w,onValueCommit:T,min:a,max:l,step:f,minStepsBetweenThumbs:m,children:[(0,b.jsx)(s,{className:g.track,children:(0,b.jsx)(o,{className:g.range})}),(0,b.jsx)(c,{..._(y),className:g.thumb,"aria-label":S({id:`preply-ds.slider-field.accessibility-label.minimum`,defaultMessage:`Minimum {label}`,description:`A label for a slider input's minimum value.
                            For example: 'Minimum Price'.`},{label:v})}),(0,b.jsx)(c,{..._(y),className:g.thumb,"aria-label":S({id:`preply-ds.slider-field.accessibility-label.maximum`,defaultMessage:`Maximum {label}`,description:`A label for a slider input's maximum value.
                            For example: 'Maximum Price'.`},{label:v})})]})});try{x.displayName=`RangeSlider`,x.__docgenInfo={description:`A slider input that allows users to select a range between two values.`,displayName:`RangeSlider`,props:{id:{defaultValue:null,description:`The unique identifier for the range slider element.`,name:`id`,required:!1,type:{name:`enum`,value:[{value:`string`}]}},"aria-label":{defaultValue:null,description:`Accessible label for the range slider.`,name:`aria-label`,required:!1,type:{name:`enum`,value:[{value:`string`}]}},"aria-labelledby":{defaultValue:null,description:`ID of the element that labels the range slider.`,name:`aria-labelledby`,required:!1,type:{name:`enum`,value:[{value:`string`}]}},"aria-describedby":{defaultValue:null,description:`ID of the element that describes the range slider.`,name:`aria-describedby`,required:!1,type:{name:`enum`,value:[{value:`string`}]}},"aria-invalid":{defaultValue:null,description:`Indicates whether the range slider value is invalid.`,name:`aria-invalid`,required:!1,type:{name:`enum`,value:[{value:`false`},{value:`true`}]}},"aria-errormessage":{defaultValue:null,description:`ID of the element that describes the error, if any.`,name:`aria-errormessage`,required:!1,type:{name:`enum`,value:[{value:`string`}]}},value:{defaultValue:null,description:"The controlled value of the range slider.\nMust be used in conjunction with `onValueChange`.",name:`value`,required:!1,type:{name:`enum`,value:[{value:`RangeSliderValue`}]}},defaultValue:{defaultValue:{value:`[0, 100]`},description:`The value of the range slider when initially rendered.
Use when you do not need to control the state of the range slider.`,name:`defaultValue`,required:!1,type:{name:`enum`,value:[{value:`RangeSliderValue`}]}},onValueChange:{defaultValue:null,description:`Event handler called when the value changes.`,name:`onValueChange`,required:!1,type:{name:`enum`,value:[{value:`(value: RangeSliderValue) => void`}]}},onValueCommit:{defaultValue:null,description:`Event handler called when the value is committed (e.g. on pointer up or Enter key).`,name:`onValueCommit`,required:!1,type:{name:`enum`,value:[{value:`(value: RangeSliderValue) => void`}]}},name:{defaultValue:null,description:`The name of the range slider. Submitted with its owning form as part of a name/value pair.`,name:`name`,required:!1,type:{name:`enum`,value:[{value:`string`}]}},min:{defaultValue:{value:`0`},description:`The minimum value for the range slider.`,name:`min`,required:!1,type:{name:`enum`,value:[{value:`number`}]}},max:{defaultValue:{value:`100`},description:`The maximum value for the range slider.`,name:`max`,required:!1,type:{name:`enum`,value:[{value:`number`}]}},step:{defaultValue:{value:`1`},description:`The slider stepping interval.`,name:`step`,required:!1,type:{name:`enum`,value:[{value:`number`}]}},minStepsBetweenThumbs:{defaultValue:{value:`0`},description:`The minimum permitted steps between thumbs.`,name:`minStepsBetweenThumbs`,required:!1,type:{name:`enum`,value:[{value:`number`}]}},dataset:{defaultValue:null,description:``,name:`dataset`,required:!1,type:{name:`enum`,value:[{value:`Dataset`}]}}}}}catch{}}));export{S as n,x as t};