import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react from 'react';
import react__default, { ReactNode, PropsWithChildren } from 'react';
import * as react_hook_form from 'react-hook-form';
import { FieldValues, UseFormReturn, FieldPath, ControllerProps } from 'react-hook-form';
import { T as TabDefinition } from './constants-CAwtRicB.js';
export { P as PRODUCT_DETAIL_FIELDS, a as PRODUCT_DETAIL_QUERY, d as defineTabMeta } from './constants-CAwtRicB.js';
import { Label, Slot } from 'radix-ui';
import * as _tanstack_react_table from '@tanstack/react-table';
import { Table, ColumnDef, Row, RowSelectionState, OnChangeFn } from '@tanstack/react-table';

declare function App(): react_jsx_runtime.JSX.Element;

declare const useTabbedForm: <T extends FieldValues = FieldValues>() => UseFormReturn<T>;
type FooterRenderProps = {
    isLastTab: boolean;
    onNext: () => void;
    isLoading?: boolean;
};
type TabbedFormProps<T extends FieldValues> = {
    form: UseFormReturn<T>;
    onSubmit: (e?: React.BaseSyntheticEvent) => void;
    children: ReactNode;
    isLoading?: boolean;
    footer?: (props: FooterRenderProps) => ReactNode;
    transformTabs?: (tabs: TabDefinition<T>[]) => TabDefinition<T>[];
};
declare function Root<T extends FieldValues>({ form, onSubmit, children, isLoading, footer, transformTabs, }: TabbedFormProps<T>): react_jsx_runtime.JSX.Element;
declare const TabbedForm: typeof Root & {
    Tab: ({ children, }: {
        id: string;
        label: string;
        children?: ReactNode;
    }) => react_jsx_runtime.JSX.Element;
    useForm: <T extends FieldValues = FieldValues>() => UseFormReturn<T>;
};

declare const Form: (<TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => react__default.JSX.Element) & {
    Item: react__default.ForwardRefExoticComponent<react__default.HTMLAttributes<HTMLDivElement> & react__default.RefAttributes<HTMLDivElement>>;
    Label: react__default.ForwardRefExoticComponent<Omit<Label.LabelProps & react__default.RefAttributes<HTMLLabelElement>, "ref"> & {
        optional?: boolean;
        tooltip?: ReactNode;
        icon?: ReactNode;
    } & react__default.RefAttributes<HTMLLabelElement>>;
    Control: react__default.ForwardRefExoticComponent<Omit<Slot.SlotProps & react__default.RefAttributes<HTMLElement>, "ref"> & react__default.RefAttributes<HTMLElement>>;
    Hint: react__default.ForwardRefExoticComponent<react__default.HTMLAttributes<HTMLParagraphElement> & react__default.RefAttributes<HTMLParagraphElement>>;
    ErrorMessage: react__default.ForwardRefExoticComponent<react__default.HTMLAttributes<HTMLParagraphElement> & react__default.RefAttributes<HTMLParagraphElement>>;
    Field: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
};

interface HeadlessControllerProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<ControllerProps<TFieldValues, TName>, "render"> {
}
interface SwitchBoxProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends HeadlessControllerProps<TFieldValues, TName> {
    label: string;
    description: string;
    optional?: boolean;
    tooltip?: ReactNode;
    /**
     * Callback for performing additional actions when the checked state changes.
     * This does not intercept the form control, it is only used for injecting side-effects.
     */
    onCheckedChange?: (checked: boolean) => void;
}
/**
 * Wrapper for the Switch component to be used with `react-hook-form`.
 *
 * Use this component whenever a design calls for wrapping the Switch component
 * in a container with a label and description.
 */
declare const SwitchBox: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ label, description, optional, tooltip, onCheckedChange, ...props }: SwitchBoxProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;

interface FileType {
    id: string;
    url: string;
    file: File;
}
interface FileUploadProps {
    label: string;
    multiple?: boolean;
    hint?: string;
    hasError?: boolean;
    formats: string[];
    onUploaded: (files: FileType[]) => void;
    onRemove?: () => void;
    uploadedImage?: string | null;
    fileName?: string;
    fileSize?: number;
}
declare const FileUpload: ({ label, hint, multiple, hasError, formats, onUploaded, onRemove, uploadedImage, fileName, fileSize, }: FileUploadProps) => react_jsx_runtime.JSX.Element;

type ChipInputProps = {
    value?: string[];
    onChange?: (value: string[]) => void;
    onBlur?: () => void;
    name?: string;
    disabled?: boolean;
    allowDuplicates?: boolean;
    showRemove?: boolean;
    variant?: "base" | "contrast";
    placeholder?: string;
    className?: string;
};
declare const ChipInput: react.ForwardRefExoticComponent<ChipInputProps & react.RefAttributes<HTMLInputElement>>;

type ActionProps = {
    action?: {
        to: string;
        label: string;
    };
};
type NoRecordsProps = {
    title?: string;
    message?: string;
    className?: string;
    buttonVariant?: string;
    icon?: react__default.ReactNode;
} & ActionProps;

type DataTableOrderByKey<TData> = {
    key: keyof TData;
    label: string;
};

interface DataTableQueryProps<TData> {
    search?: boolean | "autofocus";
    orderBy?: DataTableOrderByKey<TData>[];
    filters?: Filter[];
    prefix?: string;
}

type BulkCommand = {
    label: string;
    shortcut: string;
    action: (selection: Record<string, boolean>) => Promise<void>;
};
interface DataTableRootProps<TData> {
    /**
     * The table instance to render
     */
    table: Table<TData>;
    /**
     * The columns to render
     */
    columns: ColumnDef<TData, any>[];
    /**
     * Function to generate a link to navigate to when clicking on a row
     */
    navigateTo?: (row: Row<TData>) => string;
    /**
     * Bulk actions to render
     */
    commands?: BulkCommand[];
    /**
     * The total number of items in the table
     */
    count?: number;
    /**
     * Whether to display pagination controls
     */
    pagination?: boolean;
    /**
     * Whether the table is empty due to no results from the active query
     */
    noResults?: boolean;
    /**
     * Whether to display the tables header
     */
    noHeader?: boolean;
    /**
     * The layout of the table
     */
    layout?: "fill" | "fit";
}

interface DataTableProps<TData> extends Omit<DataTableRootProps<TData>, "noResults">, DataTableQueryProps<TData> {
    isLoading?: boolean;
    pageSize: number;
    queryObject?: Record<string, any>;
    noRecords?: Pick<NoRecordsProps, "title" | "message" | "icon">;
}
/**
 * @deprecated Use the DataTable component from "/components/data-table" instead
 */
declare const _DataTable: <TData>({ table, columns, pagination, navigateTo, commands, count, search, orderBy, filters, prefix, queryObject, pageSize, isLoading, noHeader, layout, noRecords: noRecordsProps, }: DataTableProps<TData>) => react_jsx_runtime.JSX.Element;

type Option = {
    label: string;
    value: unknown;
};
type Filter = {
    key: string;
    label: string;
} & ({
    type: "select";
    options: Option[];
    multiple?: boolean;
    searchable?: boolean;
} | {
    type: "date";
    options?: never;
} | {
    type: "string";
    options?: never;
} | {
    type: "number";
    options?: never;
});

type UseDataTableProps<TData> = {
    data?: TData[];
    columns: ColumnDef<TData, any>[];
    count?: number;
    pageSize?: number;
    enableRowSelection?: boolean | ((row: Row<TData>) => boolean);
    rowSelection?: {
        state: RowSelectionState;
        updater: OnChangeFn<RowSelectionState>;
    };
    enablePagination?: boolean;
    enableExpandableRows?: boolean;
    getRowId?: (original: TData, index: number) => string;
    getSubRows?: (original: TData) => TData[];
    meta?: Record<string, unknown>;
    prefix?: string;
};
declare const useDataTable: <TData>({ data, columns, count, pageSize: _pageSize, enablePagination, enableRowSelection, enableExpandableRows, rowSelection: _rowSelection, getSubRows, getRowId, meta, prefix, }: UseDataTableProps<TData>) => {
    table: _tanstack_react_table.Table<TData>;
};

interface PageProps<TData> {
    children: ReactNode;
    data?: TData;
    showJSON?: boolean;
    showMetadata?: boolean;
    hasOutlet?: boolean;
}

declare const SingleColumnPage: <TData>({ children, data, hasOutlet, showJSON, showMetadata, }: PageProps<TData>) => react_jsx_runtime.JSX.Element;

type Action = {
    icon: ReactNode;
    label: string;
    disabled?: boolean;
    /**
     * Optional tooltip to display when a disabled action is hovered.
     */
    disabledTooltip?: string | ReactNode;
} & ({
    to: string;
    onClick?: never;
} | {
    onClick: () => void;
    to?: never;
});
type ActionGroup = {
    actions: Action[];
};
type ActionMenuProps = PropsWithChildren<{
    groups: ActionGroup[];
    variant?: "transparent" | "primary";
}>;
declare const ActionMenu: ({ groups, variant, children, }: ActionMenuProps) => react_jsx_runtime.JSX.Element;

declare const Notifications: () => react_jsx_runtime.JSX.Element;

export { ActionMenu, ChipInput, _DataTable as DataTable, type FileType, FileUpload, type FileUploadProps, type Filter, Form, Notifications, SingleColumnPage, SwitchBox, TabDefinition, TabbedForm, App as default, useDataTable, useTabbedForm };
