import { IconCellColor, IconCellState, IconCellVariant, IconCellVariants } from "./IconCell.types.js"; import * as react41 from "react"; import { HTMLAttributes, MouseEventHandler, ReactNode } from "react"; import { IconData } from "@equinor/eds-icons"; //#region src/molecules/IconCell/IconCell.d.ts type ScribbledOutType = typeof IconCellVariants.SCRIBBLED_OUT; type SharedProps = { onClick?: MouseEventHandler; disabled?: boolean; selected?: boolean; className?: string; color?: IconCellColor; state?: IconCellState; label?: string; helperIcon?: ReactNode | IconData; noBottomBorder?: boolean; as?: 'td' | 'div'; } & HTMLAttributes; type ScribbledOutProps = { variant: ScribbledOutType; icon?: never; } & SharedProps; type RegularIconCellProps = { variant?: Exclude; icon: ReactNode | IconData; } & SharedProps; type IconCellProps = ScribbledOutProps | RegularIconCellProps; /** * IconCell component renders a styled button-like cell with an icon, optional label, * and optional helper icon. It supports various visual states and interaction handlers. * * ### Special case * When `variant` is `IconCellVariants.SCRIBBLED_OUT`, this component renders a scribbled-out cell and so the icon becomes optional. * * @param {IconCellProps} props - Component props. * @param {React.ReactNode | IconData} [props.icon] - Main icon displayed in the center of the cell. * @param {MouseEventHandler} [props.onClick] - Callback fired when the cell is clicked. * @param {boolean} [props.disabled=false] - Whether the cell is disabled. * @param {boolean} [props.selected=false] - Whether the cell is in a selected state. * @param {string} [props.className] - Optional CSS class for custom styling. * @param {IconCellColor} [props.color=IconCellColors.DEFAULT] - Color theme of the cell. * @param {IconCellState} [props.state=IconCellStates.DEFAULT] - Visual state of the cell: default, danger, or warning. * @param {string} [props.label] - Optional label text displayed inside the cell. * @param {IconCellVariant} [props.variant=IconCellVariants.DEFAULT] - Variant of the cell: `transparent`, `coloured`, or the special `scribbled-out`. * @param {React.ReactNode | IconData} [props.helperIcon] - Optional secondary icon displayed in the corner. * @param {boolean} [props.noBottomBorder=false] - Whether to render the cell without the default bottom border. * @param {'td' | 'div'} [props.as='td'] - Element type to render the outer container as. * @param {React.Ref} ref - Ref forwarded to the inner button element. * @returns {JSX.Element} The rendered IconCell. */ declare const IconCell: react41.ForwardRefExoticComponent>; //#endregion export { IconCell, IconCellProps };