import { TPlainObject } from '@flatbiz/utils';
import { CSSProperties, ReactElement, ReactNode } from 'react';

export interface CommonPropsWithChildren<S extends TPlainObject = TPlainObject> {
	className?: string;
	style?: CSSProperties & Partial<S>;
	children?: ReactNode | undefined;
}
export type CheckListItemValue = string | number;
export type CheckListSelectedValue<T extends "multi" | "radio"> = T extends "multi" ? CheckListItemValue[] : CheckListItemValue;
export type CheckListProps<T extends "multi" | "radio"> = {
	multiple?: boolean;
	onChange?: (value: CheckListSelectedValue<T>, operateValue: CheckListItemValue) => void;
	onPreChange?: (value: CheckListItemValue) => Promise<void>;
	value?: CheckListSelectedValue<T>;
	defaultValue?: CheckListSelectedValue<T>;
	beforeExtra?: ReactNode;
	afterExtra?: ReactNode;
	stopPropagation?: boolean;
	required?: boolean;
} & CommonPropsWithChildren;
export type CheckListItemContentProps = {
	checked?: boolean;
	disabled?: boolean;
	onClick?: (event: any) => void;
	className?: string;
	readonly?: boolean;
	style?: CSSProperties;
};
export type CheckListItemProps = {
	value: CheckListItemValue;
	disabled?: boolean;
	readonly?: boolean;
	children: (data: CheckListItemContentProps) => ReactElement;
	className?: string;
	style?: CSSProperties;
};
export declare const CheckList: (<T extends "multi" | "radio">(props: CheckListProps<T>) => import("react").JSX.Element) & {
	Item: (props: CheckListItemProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
};

export {};
