
"use client";
import { UniversalButtonProps } from "../../../types/dist/index.js";
import { IconPropsWithSVGProps } from "../../../tokens/types.js";
import React, { ForwardRefExoticComponent } from "react";

//#region src/components/client/Button/ButtonBase.d.ts
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'name'>;
type DataAttributes = {
  [name: `data-${string}`]: string;
};
interface ButtonProps extends HtmlButtonProps, UniversalButtonProps {
  slotProps?: {
    startIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
    endIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
    content?: Partial<React.HTMLAttributes<HTMLSpanElement> & DataAttributes>;
  };
}
type ButtonIconRenderArgs = {
  iconVariant: ButtonProps['iconVariant'];
  loading?: boolean;
  startIcon?: ButtonProps['startIcon'];
  endIcon?: ButtonProps['endIcon'];
  iconClassName: string;
  loadingIconClassName: string;
  iconContainerClassName: string;
  startIconClassName?: string;
  endIconClassName?: string;
  startIconSlotProps: Partial<IconPropsWithSVGProps & DataAttributes>;
  endIconSlotProps: Partial<IconPropsWithSVGProps & DataAttributes>;
};
type ButtonRootRenderArgs = {
  asChild: boolean;
  Slot: ForwardRefExoticComponent<HtmlButtonProps>;
  children: React.ReactNode;
  buttonRef: React.ForwardedRef<HTMLButtonElement>;
  type: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];
  rootClassName: string;
  rest: Omit<ButtonProps, 'children' | 'slotProps' | 'asChild' | 'type' | 'className'>;
  contentClassName: string;
  contentSlotProps: Partial<React.HTMLAttributes<HTMLSpanElement> & DataAttributes>;
  startContent: React.ReactNode;
  endContent: React.ReactNode;
};
interface ButtonBaseProps extends ButtonProps {
  renderStartContent: (args: ButtonIconRenderArgs) => React.ReactNode;
  renderEndContent: (args: ButtonIconRenderArgs) => React.ReactNode;
  renderRoot: (args: ButtonRootRenderArgs) => React.ReactNode;
}
declare const ButtonBase: ForwardRefExoticComponent<ButtonBaseProps & React.RefAttributes<HTMLButtonElement>>;
declare function renderButtonChildren(children: React.ReactNode, childProps: Record<string, unknown>, startContent: React.ReactNode, contentClassName: string, contentSlotProps: Partial<React.HTMLAttributes<HTMLSpanElement> & DataAttributes>, endContent: React.ReactNode): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
//#endregion
export { ButtonBase, type ButtonProps, type ButtonRootRenderArgs, renderButtonChildren };