"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ButtonUpload = ButtonUpload;
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const Button_1 = require("../Button");
const types_1 = require("../types");
function ButtonUpload({ fileType, handleUploadClick, helpText, loading = false, disabled = false, }) {
    return (react_1.default.createElement(react_1.default.Fragment, null,
        react_1.default.createElement("div", { className: 'mt-2 flex text-sm leading-6 text-gray-600' },
            react_1.default.createElement("label", { className: 'relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 hover:text-indigo-500', htmlFor: 'file-upload' },
                react_1.default.createElement(Button_1.PHXButton, { className: (0, types_1.classNames)(disabled ? 'cursor-not-allowed' : ''), disabled: disabled, loading: loading, onClick: handleUploadClick, secondary: true, size: 'micro' }, "T\u1EA3i l\u00EAn"))),
        helpText ? (react_1.default.createElement("p", { className: (0, types_1.classNames)('cursor-pointer text-xs leading-6 text-gray-500', disabled ? 'cursor-not-allowed' : '') }, helpText)) : (react_1.default.createElement("p", { className: (0, types_1.classNames)('text-xs leading-6 text-gray-400', disabled ? 'cursor-not-allowed' : 'cursor-pointer ') }, (fileType === 'excel' && 'XLXS, XLS tối đa 100MB') ||
            (fileType === 'image' && 'JPG, JPEG, PNG, GIF, WEBP') ||
            (fileType === 'file' && 'PDF, JPG, JPEG, PNG')))));
}
//# sourceMappingURL=ButtonUpload.js.map