/** @format */

import * as React from 'react';
import Select, {SelectOptionProp, SelectProps} from './select';
import {DataType} from '../../const/status';
const options: SelectOptionProp[] = [];
for (let k in DataType) {
    if (isNaN(k as any)) {
        options.push({
            key: Number(DataType[k]),
            value: Number(DataType[k]),
            label: k,
        });
    }
}
interface Iprops extends SelectProps {
    isAll?: boolean;
}
export default React.forwardRef((props: Iprops, ref) => {
    const {isAll = false} = props;
    return <Select ref={ref} options={isAll ? options : options.slice(1)} placeholder='请选择类别' {...props} />;
});
