import{typeof as i}from"../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as t}from"../../_virtual/_tslib.js";import{jsx as o,Fragment as r}from"react/jsx-runtime";import e from"../Icon/Icon.js";import{InfixKind as n}from"./SliderConstants.js";import{useSliderInfix as c,useSliderSelection as l}from"./SliderContext.js";import s from"./SelectionIndicator.js";var a={clickable:!1,iconSize:18,ignoreFocusStyle:!0};function f(f){var m=c(),p=m.prefix,u=m.postfix,d=m.indicateSelection,j=m.selectionIndicatorWidth,v=l(),x=v.value,S=v.valueText,b=f===n.POSTFIX?u:p;if(d&&(f===n.POSTFIX||v.ranged))return[!0,[],o(s,{kind:f},f),{width:j}];if("object"===i(b)&&b.icon){var g=b.icon,I=t(b,["icon"]),O=Object.assign(Object.assign({},a),I);return[!0,[],o(e,Object.assign({icon:g},O),"infix-icon"),{}]}return"function"==typeof b?[!0,[],b(x,S),{}]:"string"==typeof b?[!0,["txt"],o(r,{children:b}),{}]:void 0===b?[!1,[],null,{}]:[!0,[],o(r,{children:b}),{}]}export{f as useSliderInfixComponent};
