import { C as CssProperties, O as ObjectKeyArrayPicker, a as ObjectKeyPicker } from './types-BXKyjXhG.cjs'; import 'csstype'; type StyleVariantRecord = Record>; type StyleVariantExtendProps = { style: CssProperties; }; interface StyleVariantDefinition { base?: CssProperties; variants?: T; compoundVariants?: (ObjectKeyArrayPicker & StyleVariantExtendProps)[]; defaultVariants?: ObjectKeyPicker; } type StyleVariantFnProps = T extends undefined ? Partial : ObjectKeyPicker & Partial; type StyleVariantFn = (props?: StyleVariantFnProps) => CssProperties; type StyleVariantCreatorFn = (config: StyleVariantDefinition) => StyleVariantFn; /** * Creates a style variant function based on the provided configuration. * * @template T - The type of the style variant record. * @param {StyleVariantDefinition} config - The configuration object for style variants. * @returns {StyleVariantFn} A function that takes props and returns the computed CSS properties. * * @example * ```typescript * * const makeStyle = sv({ * base: { color: 'black' }, * variants: { * size: { * small: { fontSize: '12px' }, * large: { fontSize: '24px' } * } * }, * compoundVariants: [ * { size: 'large', style: { fontWeight: 'bold' } } * ], * defaultVariants: { size: 'small' } * }); * * const style = makeStyle({ size: 'large' }); * // style = { color: 'black', fontSize: '24px', fontWeight: 'bold' } * ``` */ declare const sv: StyleVariantCreatorFn; export { type StyleVariantCreatorFn, type StyleVariantDefinition, type StyleVariantExtendProps, type StyleVariantFn, type StyleVariantFnProps, type StyleVariantRecord, sv as default, sv };