{"version":3,"file":"HeaderSubpage.types.cjs","sourceRoot":"","sources":["../../../src/components/HeaderSubpage/HeaderSubpage.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { HeaderSubpagePropsShared } from '@metamask/design-system-shared';\nimport type { ComponentProps } from 'react';\n\nimport type { BoxProps } from '../Box';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextProps } from '../Text';\n\n/**\n * Props for back/close ButtonIcons that override iconName and make ariaLabel optional.\n * The component provides default ariaLabels (\"Go back\", \"Close\").\n */\ntype NavigationButtonIconProps = Partial<Omit<ButtonIconProps, 'iconName'>> & {\n  [key: `data-${string}`]: string | undefined;\n};\n\n/**\n * HeaderSubpage component props.\n *\n * Subpage navigation header with optional back/close button shortcuts.\n * Provides a consistent header pattern for secondary screens and modal-style\n * navigation flows.\n */\nexport type HeaderSubpageProps = Omit<\n  ComponentProps<'header'>,\n  'title' | 'children'\n> &\n  HeaderSubpagePropsShared & {\n    /**\n     * Props passed to the title Text component when title is a string.\n     */\n    titleProps?: Partial<TextProps>;\n    /**\n     * Props passed to the description Text component when description is a string.\n     */\n    descriptionProps?: Partial<TextProps>;\n    /**\n     * Additional props to pass to the back ButtonIcon.\n     * If provided, a back button will be rendered with these props spread.\n     */\n    backButtonProps?: NavigationButtonIconProps;\n    /**\n     * Additional props to pass to the close ButtonIcon.\n     * If provided, a close button will be added with these props spread.\n     */\n    closeButtonProps?: NavigationButtonIconProps;\n    /**\n     * Optional ButtonIcon props to render as the start accessory.\n     * Only used if `startAccessory` is not provided.\n     */\n    startButtonIconProps?: ButtonIconProps & {\n      [key: `data-${string}`]: string | undefined;\n    };\n    /**\n     * Optional array of ButtonIcon props to render as additional end accessories.\n     * Rendered in reverse order (first item appears rightmost).\n     * Only used if `endAccessory` is not provided.\n     */\n    endButtonIconProps?: (ButtonIconProps & {\n      [key: `data-${string}`]: string | undefined;\n    })[];\n    /**\n     * Gap between start/end accessories and the content.\n     * Uses spacing scale (1 = 4px, 2 = 8px, etc.).\n     *\n     * @default 2\n     */\n    accessoryGap?: BoxProps['gap'];\n    /**\n     * Optional prop for additional CSS classes to be applied to the HeaderSubpage component.\n     */\n    className?: string;\n    /**\n     * Optional CSS styles to be applied to the component.\n     */\n    style?: React.CSSProperties;\n  };\n"]}