type ImagePosition = 'direction-column'; type TextSize = 'small'; type BackgroundColor = 'grey'; type ContactCardModifierCombination = [ImagePosition, TextSize?, BackgroundColor?] | [TextSize, ImagePosition?, BackgroundColor?] | [BackgroundColor, ImagePosition?, TextSize?] | [ImagePosition, BackgroundColor, TextSize?] | [TextSize, BackgroundColor, ImagePosition?] | [BackgroundColor, TextSize, ImagePosition?]; type ImageSize = '200' | '100'; type ContactCardModifierConfig = { 'c-contact-card': ContactCardModifierCombination; 'c-contact-card__image': [ImageSize]; }; export type ContactCardModifier = { [P in keyof ContactCardModifierConfig]: { prefix: P; modifiers: ContactCardModifierConfig[P]; }; }[keyof ContactCardModifierConfig]; /** * Represents the possible types for modifier items in an ContactCard configuration. * It can either be an array of `ContactCardModifier` or a single `ModifierCombination` for shorthand usage. */ export type ModifierItems = ContactCardModifier[] | ContactCardModifierCombination; export {};