import { DataAttributes } from '../Table/types/utils.type'; import { TableDropdownConfigProps } from '../Table/components/TableDropdown/types'; import { CSSObject, FlattenSimpleInterpolation } from 'styled-components'; import { ComponentProps, MutableRefObject, ReactNode, RefObject } from 'react'; import { TooltipProps } from '../Tooltip'; import { LinkButton } from '../LinkButton'; import { DropdownProps } from '../Dropdown'; import { ButtonCompProps } from '../Button'; export type LinkButtonProps = ComponentProps; export type LinkButtonView = LinkButtonProps['view']; export type MassActionsSize = 'm' | 's' | 'xs'; export type LinkView = V extends string ? `link${Capitalize}` : undefined; export type MassActionsButtonPropsButton = DataAttributes & Partial & { type: 'button'; view?: ButtonCompProps['view']; dropdown?: DropdownProps & { $css?: CSSObject; }; disabledTooltipProps?: TooltipProps; }; export type MassActionsButtonPropsLinkButton = DataAttributes & Partial & { type?: 'linkButton'; view?: LinkView; dropdown?: DropdownProps & { $css?: CSSObject; }; disabledTooltipProps?: TooltipProps; }; export type MassActionsButtonProps = MassActionsButtonPropsButton | MassActionsButtonPropsLinkButton; export type StyledButtonProps = { $hasDropdown?: boolean; $showLabel?: boolean; $buttonStyles?: string | CSSObject | FlattenSimpleInterpolation; }; export type MassActionsCounterProps = { selectedCount: number; label?: string; showCheckbox?: boolean; checked?: boolean; indeterminate?: boolean; onCheckboxChange?: (event: React.ChangeEvent) => void; className?: string; }; export type MassActionsSidebarConfig = { isOpen: boolean; width: number; togglePanelWidth?: number; }; export type CheckboxConfig = { checked: boolean; onChange: (checked: boolean) => void; indeterminate?: boolean; disabled?: boolean; }; export type CounterConfig = { selectedCount: number; totalCount?: number; label?: string; }; export type MassActionsProps = { containerRef: RefObject | MutableRefObject | (() => HTMLElement | null); leftSection: ReactNode; middleSection?: ReactNode; buttons?: MassActionsButtonProps[]; sidebarConfig?: MassActionsSidebarConfig; isHaveSomeFeatureInSidebar?: boolean; collapsedDropdownProps?: TableDropdownConfigProps; selectedCount: number; show?: boolean; useTableDropdown?: boolean; enableDebugLogs?: boolean; bottom?: number; minPadding?: number; size?: MassActionsSize; };