import {
  IconFieldDefaults,
  BooleanFieldDefaults,
} from '@hubspot/cms-components/fields';

export type IconPurpose = 'SEMANTIC' | 'DECORATIVE';

export type IconProps = {
  fieldPath?: string;
  size?: number;
  fill?: string;
  className?: string;
  style?: React.CSSProperties;
  showIcon?: boolean;
  purpose?: IconPurpose;
  title?: string;
};

type IconToggleProps = {
  showIconLabel?: string;
  showIconName?: string;
  showIconDefault?: typeof BooleanFieldDefaults;
  addIconToggle: true;
};

type IconContentFieldsWithoutToggleProps = {
  iconLabel?: string;
  iconName?: string;
  iconDefault?: typeof IconFieldDefaults;
  addIconToggle?: boolean; // this is not a boolean field, but a boolean prop which adds the boolean field and associated visibility rules
};

export type IconContentFieldsWithToggleProps =
  IconContentFieldsWithoutToggleProps & IconToggleProps;

export type ContentFieldsProps =
  | IconContentFieldsWithToggleProps
  | IconContentFieldsWithoutToggleProps;
