import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Container, Input, Label, Link, Title, LeadingIcon, TrailingIcon, } from "./input-new.styled";
import cn from "classnames";
const InputNew = ({ width, label, leadingIcon, trailingIcon, error, linkLabel, onLinkClick, ...props }) => {
    return (_jsxs(Container, { className: cn("ui-input__container", props.className, {
            error,
            disabled: props.disabled,
            "read-only": props.readOnly,
            "leading-icon": !!leadingIcon,
            "trailing-icon": !!trailingIcon,
        }), children: [leadingIcon && _jsx(LeadingIcon, { children: leadingIcon }), _jsx(Input, { ...props, className: cn("ui-input", { error }) }), trailingIcon && _jsx(TrailingIcon, { children: trailingIcon }), _jsxs(Title, { children: [_jsx(Label, { children: label }), _jsx(Link, { onClick: onLinkClick, children: linkLabel })] })] }));
};
export default InputNew;
//# sourceMappingURL=input-new.js.map