import React from 'react'; import { DataSet } from 'choerodon-ui/pro'; import { CheckBoxProps } from 'choerodon-ui/pro/lib/check-box/CheckBox'; import { FormProps } from 'choerodon-ui/pro/lib/form/Form'; import { OptionProps } from 'choerodon-ui/lib/select'; export interface ITableColumnCheckBoxesOptionData { label: string; value: string; checkBoxProps?: CheckBoxProps; defaultChecked?: boolean; optionConfig?: OptionProps; } interface Props { options: Array; otherCheckBoxProps?: Partial; formProps?: Partial; name?: string; dataSet?: DataSet; defaultValue?: any; handleChange?: (value: string[] | string | undefined, oldValue?: string) => void; } interface IConfig { name?: string; defaultValue?: any; options?: Props['options']; events?: { initOptions?: (data: { options: Props['options']; checkedOptions: string[]; dataSet: DataSet; }) => Props['options'] | void; }; onChange?: (data: string[] | string) => void | boolean; checkBoxProps?: Partial; } export interface ITableColumnCheckBoxesDataProps { checkedOptions: string[]; setCheckedOptions: (codes: string[]) => void; dataSet: DataSet; options: Props['options']; actions: { checkAll: () => void; unCheckAll: () => void; check: (val: string) => void; }; } interface ITableColumnCheckBoxesComponentProps extends Props { } export declare function useTableColumnCheckBoxes(config?: IConfig): [ITableColumnCheckBoxesDataProps, ITableColumnCheckBoxesComponentProps]; declare const _default: React.FunctionComponent; export default _default;