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