interface ResponsiveArray extends ReadonlyArray { 0: Value; length: Length; } interface RequiredResponsiveArray extends ReadonlyArray { 0: Exclude; length: Length; } /** * Produces the union `1 | 2 | ... | MaxLength` for a literal `MaxLength`. */ type LengthUpTo = [unknown], Result = never> = Counter['length'] extends MaxLength ? Result | MaxLength : LengthUpTo; type ResponsiveArrayByMaxLength = ResponsiveArray, Value | null>; type RequiredResponsiveArrayByMaxLength = RequiredResponsiveArray, Value | null>; type ExtractValue> | ResponsiveArrayByMaxLength> = Value extends ResponsiveArrayByMaxLength ? NonNullable : Value extends Partial> ? NonNullable : Value; type Conditions = { conditions: { defaultCondition: ConditionName | false; conditionNames: Array; responsiveArray?: Array; }; }; type ExtractDefaultCondition> = SprinklesProperties['conditions']['defaultCondition']; type ExtractConditionNames> = SprinklesProperties['conditions']['conditionNames'][number]; type ConditionalValue, Value extends string | number | boolean> = (ExtractDefaultCondition extends false ? never : Value) | Partial, Value>> | (SprinklesProperties['conditions']['responsiveArray'] extends { length: number; } ? ResponsiveArrayByMaxLength : never); type RequiredConditionalObject = Record & Partial>; type RequiredConditionalValue, Value extends string | number | boolean> = ExtractDefaultCondition extends false ? never : Value | RequiredConditionalObject, false>, Exclude, ExtractDefaultCondition>, Value> | (SprinklesProperties['conditions']['responsiveArray'] extends { length: number; } ? RequiredResponsiveArrayByMaxLength : never); declare function createNormalizeValueFn>(properties: SprinklesProperties): (value: ConditionalValue) => Partial, Value>>; declare function createMapValueFn>(properties: SprinklesProperties): >(value: Value, fn: (inputValue: ExtractValue, key: ExtractConditionNames) => OutputValue) => Value extends string | number | boolean ? OutputValue : Partial, OutputValue>>; export { type ConditionalValue, type RequiredConditionalValue, createMapValueFn, createNormalizeValueFn };