import type { CSSProperties } from "react";

export type SxStyleObject = CSSProperties & {
  [key: string]: unknown;
};

export type SxSlotValue =
  | string
  | SxStyleObject
  | {
      tw?: string;
      className?: string;
      css?: SxStyleObject;
      style?: SxStyleObject;
    };

export type SxValue =
  | string
  | SxStyleObject
  | {
      root?: SxSlotValue;
      slots?: Record<string, SxSlotValue>;
      tw?: string;
      className?: string;
      css?: SxStyleObject;
      style?: SxStyleObject;
      [slotOrStyle: string]: unknown;
    };

export type NormalizedSxSlot = {
  tw: string;
  css: SxStyleObject;
};

export declare const useTangoStyle: (sx?: SxStyleObject) => SxStyleObject;

export declare const mergeTwClassNames: (
  ...inputs: Array<string | null | undefined | false>
) => string;

export declare const normalizeSxSlots: (
  sx: SxValue,
  slotNames?: string[]
) => Record<string, NormalizedSxSlot>;

export declare const createSlotProps: (options?: {
  baseClassName?: string;
  className?: string;
  baseStyle?: SxStyleObject;
  style?: SxStyleObject;
  sxSlot?: NormalizedSxSlot;
}) => {
  className: string;
  style: SxStyleObject;
};
