import * as tslib_1 from "tslib";
import React from 'react';
import classnames from 'classnames';
import Option from './option';
import Group from './group';
var defaultProps = {
    prefixCls: 'ty-select-native',
    size: 'md',
    disabled: false,
};
var NativeSelect = function (props) {
    var _a;
    var size = props.size, disabled = props.disabled, prefixCls = props.prefixCls, className = props.className, style = props.style, children = props.children, restProps = tslib_1.__rest(props, ["size", "disabled", "prefixCls", "className", "style", "children"]);
    var cls = classnames(prefixCls, className, (_a = {},
        _a[prefixCls + "_" + size] = size,
        _a[prefixCls + "_disabled"] = disabled,
        _a));
    return (React.createElement("select", tslib_1.__assign({ className: cls, style: style }, restProps), React.Children.map(children, function (child) {
        return React.cloneElement(child, tslib_1.__assign({}, child.props, { disabled: disabled }));
    })));
};
NativeSelect.defaultProps = defaultProps;
NativeSelect.Option = Option;
NativeSelect.Group = Group;
export default NativeSelect;
//# sourceMappingURL=index.js.map