"use strict";
exports.id = 873;
exports.ids = [873];
exports.modules = {

/***/ 5911:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);

const Button = ({ type , label , className , onClick , icon , id  })=>{
    const classes = "bg-theme-main text-white py-2 px-5 rounded-lg min-w-[80px] inline-flex items-center justify-center" + (className ? " " + className : "");
    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", {
        className: classes,
        type: type,
        onClick: onClick,
        id: id,
        children: [
            icon,
            label
        ]
    });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Button);


/***/ }),

/***/ 9821:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);

const Input = ({ label , type , placeholder , onChange , onClick , defaultValue , value , name , id , onFocus , disabled  })=>{
    const classes = {
        div: "flex flex-col mb-2",
        label: "mb-2",
        input: "border border-gray-500 rounded-lg px-3 py-2"
    };
    const slugType = (e)=>{
        let value = e.target.value;
        e.target.value = value.replace(/[^-a-zA-Z0-9-آ-ی\s+]+/gi, "").replace(/\s+/gi, "-").toLowerCase();
    };
    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
        className: classes.div,
        children: [
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("label", {
                className: classes.label,
                htmlFor: name,
                children: label
            }),
            /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("input", {
                type: type,
                placeholder: placeholder,
                className: classes.input,
                onChange: onChange,
                onClick: onClick,
                onFocus: onFocus,
                name: name,
                id: id,
                disabled: disabled ? disabled : false,
                readOnly: disabled ? disabled : false,
                autoComplete: "off",
                onKeyUp: type === "slug" ? slugType : undefined,
                defaultValue: defaultValue ? defaultValue : value ? value : undefined
            })
        ]
    });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Input);


/***/ })

};
;