import React from 'react'; import { Color, Size, Kind } from '../../types'; import { FontStyleTypeModel, ThemeTypesModel } from '../../Themes/theme_types'; type availableColors = Color.green | Color.dark | Color.blue | Color.danger; interface ButtonProps { allowBorderFocus?: boolean; label?: string; icon?: string; size?: Size | 'xl'; color?: availableColors; kind?: Kind; customIcon?: () => React.ReactNode; width?: 'fixed' | 'full'; ariaLabel?: React.AriaAttributes['aria-label']; className?: string; alignLeftLabel?: boolean; tabIndex?: number; reverseIcon?: boolean; aria?: object; isBack?: boolean; role?: string; isDisabled?: boolean; isInverse?: boolean; isLoading?: boolean; isColorBg?: boolean; ariaDescribedby?: React.AriaAttributes['aria-describedby']; theme?: ThemeTypesModel; onClick?: (e: React.MouseEvent) => void; onFocus?: (e: React.FocusEvent) => void; onBlur?: (e: React.FocusEvent) => void; onMouseEnter?: (e: React.MouseEvent) => void; onMouseLeave?: (e: React.MouseEvent) => void; } interface ButtonElementProps { allowBorderFocus?: boolean; width: 'fixed' | 'full'; size: Size | 'xl'; kind: Kind; isActive: boolean; alignLeftLabel?: boolean; icon?: string; color: availableColors; isLoading: boolean; isBack?: boolean; styled: ModelView; label?: string; dayTime: 'day' | 'night'; } interface elementsInSize { font: FontStyleTypeModel; } interface kindColorComponent { green: kindViewComponent; blue: kindViewComponent; dark: kindViewComponent; danger: kindViewComponent; } interface styleComponentParams { background: string; fontColor: string; borderColor: string; } interface stateTypeComponent { default: styleComponentParams; hover: styleComponentParams; active: styleComponentParams; } interface kindViewComponent { primaryLoud: stateTypeComponent; primary: stateTypeComponent; primaryInverse: stateTypeComponent; secondaryLoud: stateTypeComponent; secondary: stateTypeComponent; silent: stateTypeComponent; silentInverse: stateTypeComponent; } interface dayTime { day: kindColorComponent; night: kindColorComponent; } interface ModelView { style: dayTime; size: { s: elementsInSize; m: elementsInSize; l: elementsInSize; xl: elementsInSize; }; } export type { ButtonProps, ButtonElementProps, ModelView };