import{slicedToArray as e}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as r}from"react/jsx-runtime";import{useState as a,useMemo as l,createContext as t,useContext as i}from"react";import{createTestIdHelper as n}from"../../helpers/testid-helper.js";import{useSliderValues as u,useDragging as o,useSliderActionsContextValue as s}from"./UseSliderHooks.js";var d=t({}),c=t({}),v=t({}),m=t({});function f(t){var i=t.children,f=t.ariaLabel,p=t.ariaLabelledby,b=t.color,g=t.defaultValue,h=t.disabled,j=t.max,x=t.min,V=t.onChange,O=t.ranged,P=t.showValue,T=t.size,L=t.step,y=t.value,S=t.valueFormatter,w=t.valueText,z=t.infixOptions,H=n(t["data-testid"]),_=u(g,y,S,w),k=_.actualValue,A=_.actualValueText,B=_.getSelectedValue,C=_.setSelectedValue,F=a(null),I=e(F,2),U=I[0],q=I[1],D=a(null),E=e(D,2),G=E[0],J=E[1],K=o(),M=e(K,3),N=M[0],Q=M[1],R=M[2],W=l((function(){return{active:U,ariaLabel:f,ariaLabelledby:p,color:b,disabled:h,dragging:N,focused:G,size:T,shapeTestId:H,showValue:P}}),[U,f,p,b,h,N,G,T,H,P]),X=l((function(){return{max:j,min:x,ranged:O,step:L,value:k,valueText:A}}),[j,x,O,L,k,A]),Y=s(k,G,R,B,j,x,V,O,q,J,Q,C,L);return r(d.Provider,Object.assign({value:W},{children:r(c.Provider,Object.assign({value:X},{children:r(v.Provider,Object.assign({value:Y},{children:r(m.Provider,Object.assign({value:z},{children:i}))}))}))}))}function p(){return i(d)}function b(){return i(m)}function g(){return i(c)}function h(){return i(v)}export{f as SliderProvider,h as useSliderActions,b as useSliderInfix,g as useSliderSelection,p as useSliderUi};
