{"version":3,"sources":["pages/CompaniesTab/Address/styles.module.scss","pages/CompaniesTab/OtherInfo/styles.module.scss","pages/CompaniesTab/Users/styles.module.scss","pages/Libraries/styles.module.scss","pages/RequestUserLogin/styles.module.scss","pages/Detail/styles.module.scss","pages/Login/styles.module.scss","pages/Create/styles.module.scss","pages/Modals/ModalLicenses/styles.module.scss","pages/ChangePassword/styles.module.scss","pages/Company/styles.module.scss","context/authContext.tsx","assets/images/logo_cabecalho.png","services/apiUrl.ts","services/api.ts","hooks/useAuth.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/Table/index.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/Alert/index.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/Button/index.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/DropContainer/index.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/FileList-Uploader/index.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/InputText/index.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/Select/index.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/DateInput/index.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/TextBox/index.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/Sidebar/index.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/TabContents/index.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/UploadMessege/index.tsx","../../../../Front-end Libraries/WpsWebLibrary/src/lib/Uploader/index.tsx","pages/Login/index.tsx","context/titleContext.tsx","hooks/useTitle.tsx","components/Filter/index.tsx","pages/Profile/index.tsx","pages/Modals/ModalAddImages/index.tsx","pages/Detail/index.tsx","pages/Create/index.tsx","pages/Dashboard/index.tsx","pages/Search/index.tsx","pages/Modals/ModalAddress/index.tsx","pages/CompaniesTab/Address/index.tsx","pages/Modals/ModalLicenses/index.tsx","pages/Modals/ModalLicensesRenov/index.tsx","pages/Modals/ModalConfirmation/index.tsx","pages/CompaniesTab/Licenses/index.tsx","pages/Modals/ModalOtherInfo/index.tsx","pages/CompaniesTab/OtherInfo/index.tsx","pages/Modals/ModalUsers/index.tsx","pages/CompaniesTab/Users/index.tsx","pages/Modals/ModalCompany/index.tsx","pages/Company/index.tsx","pages/Licenses/index.tsx","pages/Modals/ModalLibrary/index.tsx","pages/Modals/ModalLibraryFTP/index.tsx","pages/Libraries/index.tsx","pages/Modals/ModalBuyEnvelopes/index.tsx","pages/Modals/ModalTransferEnvelopes/index.tsx","pages/Register/index.tsx","pages/ChangePassword/index.tsx","pages/RequestUserLogin/index.tsx","pages/EnvelopeManagement/index.tsx","routes.tsx","App.tsx","index.tsx","pages/Register/styles.module.scss","pages/Modals/ModalLibrary/styles.module.scss","pages/Modals/ModalLibraryFTP/styles.module.scss","pages/CompaniesTab/Licenses/styles.module.scss","pages/Modals/ModalUsers/styles.module.scss","pages/Modals/ModalCompany/styles.module.scss","pages/Modals/ModalTransferEnvelopes/styles.module.scss","pages/Dashboard/styles.module.scss","pages/Modals/ModalConfirmation/styles.module.scss","pages/Licenses/styles.module.scss","pages/EnvelopeManagement/styles.module.scss","components/Filter/styles.module.scss","pages/Modals/ModalAddress/styles.module.scss","pages/Modals/ModalLicensesRenov/styles.module.scss","pages/Modals/ModalOtherInfo/styles.module.scss","pages/Modals/ModalBuyEnvelopes/styles.module.scss","pages/Profile/styles.module.scss","pages/Modals/ModalAddImages/styles.module.scss"],"names":["module","exports","templateObject_1","apiUrl","api","axios","create","baseURL","__makeTemplateObject","cooked","raw","Object","defineProperty","value","__assign","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","e","rejected","result","done","then","__generator","body","f","y","g","_","label","sent","trys","ops","verb","Symbol","iterator","v","op","TypeError","pop","push","override","css","AuthContext","createContext","AuthContextProvider","props","_this","_a","useState","loading","setLoading","_b","login","setLogIn","useEffect","storegedtoken","localStorage","getItem","handleSetLogin","token","payload","name","company","companyId","role","login_1","expiresIn","hasPluginMaker","split","atob","JSON","parse","decodeURIComponent","escape","UserName","CompanyName","CompanyId","UserId","exp","HasPluginMaker","handleLogout","setItem","undefined","removeItem","_jsx","className","children","ClipLoader","size","Provider","useAuth","useContext","success","info","type","onClick","lineBtn","borderMEssege","isDragActive","isDragReject","fileRejections","rootProps","images","deleteButton","map","image","index","style","backgroundImage","preview","height","width","borderRadius","backgroundPosition","backgroundSize","backgroundRepeat","readableSize","id","error","title","String","inicialValue","includes","join","hidden","invisible","placeholder","onChange","disabled","isPassword","resize","maxlength","maxLength","values","options","valueMember","displayMember","firstOption","notNull","item","__spreadArray","to","from","il","j","_c","_d","_e","isMenuOpen","setIsMenuOpen","_f","currentBranch","setCurrentBranch","Header","logoUrl","src","alt","user","substr","toUpperCase","logOut","SideBar","menu","branches","current","filter","x","handleOpenCloseBranches","icon","link","itemBranch","openTab","setOpenTab","contents","fontSize","preventDefault","href","ComponentVal","line","setLine","showComments","setShowComments","showBtnEdit","setShowBtnEdit","changeItems","position","valueInsideTable","data","target","setData","setIdToChange","selectedComments","val","comments","columns","page","col","maxLenghtToShowSeeMore","dat","key","dateTime","editable","trim","exporter","separator","filename","headers","headerButtons","button","fn","lineButton","linebtn","lineButtonForEach","content","index1","viewed","column","changeExistentContent","changeItemsSelect","select","prefix","decimalsLimit","decimalValue","replace","changeItemsMonay","eventClick","cursor","Intl","DateTimeFormat","dateStyle","timeStyle","format","Date","NumberFormat","currency","hideWithCondition","hideButton","highLightLine","highLightLineAndLineFn","setPage","parseInt","totalPAges","hasNext","setSize","color","renderDragMessege","accept","onDropAccepted","acepetedFiles","files","uploadedFiles","newArr","file","URL","createObjectURL","progress","uploaded","url","stateOfFilesTochange","setHasImg","getRootProps","getInputProps","newFile","newFiles","userSchema","Yup","shape","required","password","Login","history","useHistory","signInError","setSignInError","errMessage","setErrorMessage","formik","useFormik","initialValues","validationSchema","onSubmit","response","err_1","post","window","location","message","detail","styles","_jsxs","handleSubmit","logo","logoImg","LogoImg","inputText","handleChange","errorMessage","errors","touched","Alert","Link","TitleContext","TitleContextProvider","setTitle","useTitle","Filter","config","Authorization","setCompanyId","softwareId","setSoftwareId","applicationFilter","setApplicationFilter","createdByIdFilter","setCreatedByIdFilter","requestUserIdFilter","setRequestUserIdFilter","setFieldValue","fieldName","get","forEach","applications","requestUsers","createdByUsers","enableReinitialize","stateOfFilter","fieldDisplay","grid","dataType","InputText","InputDate","items","_Fragment","customFilter","InputSelect","renderFilter","checkBox","checked","closer","Button","Profile","lineBtnsWithoutAssginTo","BsSearch","menuButtons","GrFilter","setFilter","FiPlus","helps","setHelps","pageSize","setPageSize","setHasNext","totalPages","setTotalPages","_g","filterVal","setFilterVal","_h","filterState","setFilterState","_j","_k","now","urlTotalPages","urlPendingHelps","container","Table","Modal","setAppElement","ModalAddImages","photos","setPhotos","closeModal","setRefresh","handlecloseModalAddImages","isOpen","modalIsOpenAddImages","shouldCloseOnOverlayClick","onRequestClose","overlayClassName","contentLabel","header","AiOutlineClose","FormData","append","console","log","helpId","Uploader","commentSchema","comment","min","Detail","historic","setHistoric","statusToSelct","setStatusToSelct","typesToSelect","setTypesToSelect","_l","requestUserToSelect","setRequestUserToSelect","_m","softawaresToSelct","setSoftwaressToSelct","_o","applicationToSelect","setApplicationToSelect","_p","assignedToSelect","setAssignedToSelect","_q","_r","refresh","_s","prioritiesSelect","setPrioritiesSelect","_t","statusWasClosed","setStatusWasClosed","_u","statusClosing","setStatusClosing","helpSchema","TfsWorkItem","nullable","typeError","resolution","when","is","otherwise","_v","img","setImg","_w","saveBtn","setSaveBtn","_x","setIsOpenAddImages","_y","isSubmittingComment","setIsSubmittingComment","useParams","pathname","sideBarSize","document","getElementById","classList","remove","add","layoutChildren","select_status","select_types","select_requestUsers","select_softwares","select_applications","select_assignedTo","select_priorities","catch","firstForm","cretedByName","companyName","tfsWorkItem","especification","creationDate","dataCriacaoComHora","requestUserId","applicationid","AssignedToId","typeid","statusid","closedBy","closedByName","closedDate","requestUserContact","anyDeskAddress","priority","actions","put","newComment","resetForm","alert","statusSelects","typesSelects","requestUser","selectSoftwares","selectApplications","selectassignes","selectPriorities","handleOpenModalAddImages","goBackOrCloseTab","opener","open","close","state","goBack","inputAreaGrid","openTfs","BsLink45Deg","openLink","formikErrors","InputTextBox","marginTop","marginBottom","attachments","spanText","spanSvg","AiOutlineFile","contentAttachments","flex","FiPaperclip","imgId","hist","commentsContainer","spanFakeButton","buttonBack","Create","companiesToSelect","setCompaniesToSelect","usersToSelect","setUsersToSelect","software","setSoftware","setApplications","helpType","setHelpType","hasImg","isSubmitting","setIsSubmitting","companies","softweres","aplication","users","applicationId","specification","helpSchemaAdmin","TypeId","softwareID","typeId","id_1","inputs","buttons","submit","Dashboard","helpsNotAssigned","setHelpsNotAssigned","pageNotAssigned","setPageNotAssigned","pageSizeNotAssigned","setPageSizeNotAssigned","totalPagesNotAssigned","setTotalPagesNotAssigned","hasNextNotAssigned","setHasNextNotAssigned","filterNotAssigned","setFilterNotAssigned","filterValNotAssigned","setFilterValNotAssigned","filterStateNotAssigned","setFilterStateNotAssigned","loadingNotAssigned","setLoadingNotAssigned","urlTotalPagesNotAssigned","urlPendingHelpsNotAssigned","urlTotalPagesAssignedToMe","urlPendingHelpsAssignedToMe","lineBtnsNotAssigned","BsPen","patch","assignToMe","lineBtnDetailNotAssigned","newhelps","lineBtns","lineBtnDetail","menuButtonsNotAssigned","pages","containerBlock","containerAssignedToMe","containerNotAssigned","Search","buttonDetailEvent","ModalAddress","setState","stateId","setStateId","cities","setCities","addressSchema","city","street","district","number","zipcode","handlecloseModalAddress","states","citiesSelect","modalIsOpenAddress","flexButton","AddressTab","idtoChange","setItems","adresState","setAdressState","setIsOpenAddress","handleOpenModalAddress","menuBtn","Modaladdress","ModalLicenses","renovationMets","setRenovationMets","product","setProduct","updateMethod","setUpdateMethod","licenseRenov","setLicenseRenov","licenseSchema","licenseRecurrenceId","renovationMethod","dueDay","licenseFee","transform","test","isNaN","decimals","quantity","details","handlecloseModalLicenses","renovationMethods","products","updateMethods","recurrenceLicense","modalIsOpenLicenses","ModalLicensesRenov","renovationDate","expirationDate","LicenseId","handlecloseModalLicensesRenov","modalIsOpenLicensesRenov","ModalConfirmation","confirmationError","setConfirmationError","handlecloseModalConfirmation","modalIsOpenConfirmation","methodTitle","withError","withOutError","delete","LicensessTab","lineBtnsWithoutAssginToDetails","refreshRenov","setRefreshRenov","setDetails","pageDetails","setPageDetails","pageSizeDetails","setPageSizeDetails","hasNextDetails","totalPagesDetails","detailsTable","setDetailsTable","loadingDetails","setLoadingDetails","titleOfLicense","setTitleOfLicense","save","setSave","licensesState","setLicensesState","idLicense","setIdLicense","contentToChange","setContentToChange","idLicenseRenov","setidLicenseRenov","idtoChangeDetails","setIdToChangeDetails","renovations","renovationTitle","BsTrash","handleOpenModalConfirmationLicense","FiDownload","handleOpenModalConfirmationLicenseRenov","MdAutorenew","lineBtnsWithoutAssginToDetailsSave","divConfirmReset","GiConfirmed","divCancelReset","GiCancel","handleOpenModalLicenses","menuBtnRenov","handleOpenModalLicensesRenov","_z","setIsOpenLicenses","_0","setIsOpenLicensesRenov","_1","modalIsOpenConfirmationLincese","setIsOpenConfirmationLicense","_2","modalIsOpenConfirmationLinceseRenov","setIsOpenConfirmationLicenseRenov","fisrtContentBoxBreak","fisrtContentBox","method","handleOpenModalConfirmation","ModalOtherInfo","otherInfoSchema","handlecloseModalOtherInfo","modalIsOpenOtherInfo","OtherInfosTab","otherInfoState","setOtherInfoState","setIsOpenOtherInfo","handleOpenModalOtherInfo","ModalUsers","userRole","setUserRole","modalIsOpenUsers","resetFormValues","userRoleId","email","cell","phone","function","handlecloseModalUsers","userRoles","UsersTab","userState","setUserState","setIsOpenUsers","handleOpenModalUsers","ModalCompany","supportOpt","setSupportOpt","modalitiesOpt","setModalities","compnaySchema","helper","max","wpsId","moreThan","cpf","matches","cnpj","isImplantation","modality","setId","handlecloseModalCompany","SupportUsers","Modalities","modalIsOpenCompany","containerCheckBoxInput","labelImplantationa","Company","companyInfo","setCompanyInfo","tabs","setTabs","statusSelect","setStatusSelect","modalityOptions","setModalityOptions","status","optionsCompanies","statusSelcts","support","modalitySelect","setIsOpenCompany","handleOpenModalCompany","dateString","registrationDate","toString","customStyles","control","provided","minHeight","boxShadow","input","padding","path","fill","indicatorsContainer","indicatorSeparator","dropdownIndicator","divSelectCompany","Select","selectCompany","gridCompanyInfo","nome","inputSelectModality","saveButton","TabContents","Licenses","err","ModalLibrary","modalIsOpenLibrary","librarySchema","compilationDate","firstLibrary","ftpHost","ftpPort","ftpUser","ftpPassword","ftpRemoteDirectory","ftpEnableSSL","handleCloseModalLibrary","labelEnableSSL","ModalLibraryFTP","loadFtpFromApi","setLoadFtpFromApi","setFtpHost","setFtpPort","setFtpRemoteDirectory","setFtpUser","setFtpEnableSSL","passwordInvisible","setPasswordInvisible","isNew","setIsNew","modalIsOpenLibraryFTP","libraryId","libraryFtpSchema","ftpChangePassword","handleCloseModalLibraryFTP","labelChangePassword","event","Libraries","idToChange","idLibrary","setIdLibrary","libraryState","setLibraryState","setModalIsOpenLibrary","handleOpenModalLibrary","setModalIsOpenLibraryFTP","handleOpenModalLibraryFTP","lineBtnLibraryFTP","FiEdit3","ModalBuyEnvelopes","modalIsOpenBuyEnvelopes","buyEnvelopesSchema","handleCloseModalBuyEnvelopes","ModalTransferEnvelopes","setCompanies","isOpenModalTransferEnvelopes","transferEnvelopesSchema","handleCloseModalTransferEnvelopes","selectCompanyValues","EnvelopesManagement","lineBtnsPurchasedEnvelope","lineBtnsTransferredEnvelopes","showTransfersTable","setShowTransfersTable","transferredEnvelopes","setTransferredEnvelopes","loadingTransferredEnvelopes","setLoadingTransferredEnvelopes","idPurchasedEnvelope","setIdPurchasedEnvelope","idTransferredEnvelope","setIdTransferredEnvelope","titleTransferredEnvelopes","setTitleTransferredEnvelopes","handleOpenModalConfirmationDeleteEnvelope","FaUndo","handleOpenModalConfirmationUndoTransfer","setmodalIsOpenBuyEnvelopes","handleOpenModalBuyEnvelopes","setIsOpenModalTransferEnvelopes","handleOpenModalTransferEnvelopes","isOpenModalConfirmationDeleteEnvelope","setIsOpenModalConfirmationDeleteEnvelope","isOpenModalConfirmationUndoTransfer","setIsOpenModalConfirmationUndoTransfer","TbTransferIn","Register","signInSuccess","setSignInSuccess","linkBack","RiArrowGoBackFill","newPassword","confirmPasswd","oneOf","ChangePassword","params","code","verificationCode","requestUserSchema","RequestUserLogin","Routes","RiComputerLine","AiOutlineBell","VscGraph","AiOutlineFileSearch","BiBuildingHouse","VscKey","AiOutlineRead","SlEnvolopeLetter","BrowserRouter","Switch","Route","exact","component","EnvelopeManagement","Redirect","App","ReactDOM","render","React","StrictMode"],"mappings":"yFACAA,EAAOC,QAAU,CAAC,UAAY,0B,sBCA9BD,EAAOC,QAAU,CAAC,UAAY,0B,sBCA9BD,EAAOC,QAAU,CAAC,UAAY,0B,sBCA9BD,EAAOC,QAAU,CAAC,UAAY,0B,qBCA9BD,EAAOC,QAAU,CAAC,KAAO,qBAAqB,KAAO,qBAAqB,QAAU,wBAAwB,UAAY,0BAA0B,aAAe,6BAA6B,MAAQ,sBAAsB,QAAU,wBAAwB,SAAW,yBAAyB,QAAU,wB,2CCA5SD,EAAOC,QAAU,CAAC,UAAY,0BAA0B,KAAO,qBAAqB,cAAgB,8BAA8B,QAAU,wBAAwB,eAAiB,+BAA+B,YAAc,4BAA4B,SAAW,yBAAyB,QAAU,wBAAwB,mBAAqB,mCAAmC,KAAO,qBAAqB,kBAAoB,kCAAkC,WAAa,2BAA2B,aAAe,6B,qBCArgBD,EAAOC,QAAU,CAAC,KAAO,qBAAqB,KAAO,qBAAqB,QAAU,wBAAwB,UAAY,0BAA0B,aAAe,6BAA6B,MAAQ,sBAAsB,QAAU,wBAAwB,SAAW,yBAAyB,QAAU,wB,qBCA5SD,EAAOC,QAAU,CAAC,UAAY,0BAA0B,KAAO,qBAAqB,OAAS,uBAAuB,eAAiB,+BAA+B,QAAU,wBAAwB,a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CAhND,EAAOC,QAAU,CAAC,OAAS,uBAAuB,UAAY,0BAA0B,aAAe,6BAA6B,QAAU,wBAAwB,WAAa,2BAA2B,uBAAyB,uC,qBCAvOD,EAAOC,QAAU,CAAC,UAAY,0BAA0B,eAAiB,+BAA+B,sBAAwB,sCAAsC,qBAAuB,qC,qBCA7LD,EAAOC,QAAU,CAAC,OAAS,uBAAuB,UAAY,0BAA0B,aAAe,6BAA6B,QAAU,wB,qBCA9ID,EAAOC,QAAU,CAAC,UAAY,0BAA0B,gBAAkB,gCAAgC,qBAAuB,qCAAqC,aAAe,6B,qBCArLD,EAAOC,QAAU,CAAC,UAAY,0BAA0B,gBAAkB,gCAAgC,qBAAuB,qCAAqC,mBAAqB,mC,qBCA3LD,EAAOC,QAAU,CAAC,KAAO,qBAAqB,YAAc,4BAA4B,SAAW,yBAAyB,OAAS,uBAAuB,OAAS,uB,qBCArKD,EAAOC,QAAU,CAAC,OAAS,uBAAuB,QAAU,wBAAwB,WAAa,2B,qBCAjGD,EAAOC,QAAU,CAAC,OAAS,uBAAuB,QAAU,wBAAwB,WAAa,2B,qBCAjGD,EAAOC,QAAU,CAAC,OAAS,uBAAuB,QAAU,wBAAwB,WAAa,2B,qBCAjGD,EAAOC,QAAU,CAAC,OAAS,uBAAuB,QAAU,wBAAwB,WAAa,2BAA2B,uBAAyB,uC,qBCArJD,EAAOC,QAAU,CAAC,UAAY,0BAA0B,QAAU,wB,qBCAlED,EAAOC,QAAU,CAAC,OAAS,uBAAuB,QAAU,wB","file":"static/js/main.3e39738c.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__2cl-V\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__1aOTU\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__3J62O\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__sMbv8\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"body\":\"styles_body__2kSYu\",\"logo\":\"styles_logo__1nEUu\",\"logoImg\":\"styles_logoImg__4XZGC\",\"inputText\":\"styles_inputText__2vTKB\",\"errorMessage\":\"styles_errorMessage__2GqhF\",\"error\":\"styles_error__82gO-\",\"loading\":\"styles_loading__2IslU\",\"linkBack\":\"styles_linkBack__2ngdw\",\"message\":\"styles_message__tWqw6\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__2OQ9D\",\"grid\":\"styles_grid__1wzl-\",\"inputAreaGrid\":\"styles_inputAreaGrid__2FnJZ\",\"openTfs\":\"styles_openTfs__279a6\",\"spanFakeButton\":\"styles_spanFakeButton__YpvOx\",\"attachments\":\"styles_attachments__1NB1P\",\"spanText\":\"styles_spanText__31KXp\",\"spanSvg\":\"styles_spanSvg__3xBcF\",\"contentAttachments\":\"styles_contentAttachments__ExK-q\",\"flex\":\"styles_flex__HO4RS\",\"commentsContainer\":\"styles_commentsContainer__18TU5\",\"buttonBack\":\"styles_buttonBack__1S4MB\",\"formikErrors\":\"styles_formikErrors__2HOx6\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"body\":\"styles_body__UQW0I\",\"logo\":\"styles_logo__29FAL\",\"logoImg\":\"styles_logoImg__wt-c1\",\"inputText\":\"styles_inputText__1btm0\",\"errorMessage\":\"styles_errorMessage__15Ydh\",\"error\":\"styles_error__WwyM4\",\"loading\":\"styles_loading__3DYu2\",\"linkBack\":\"styles_linkBack__2gHwk\",\"message\":\"styles_message__2RNQ2\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__35q6b\",\"grid\":\"styles_grid__3-6tg\",\"inputs\":\"styles_inputs__1ZJeK\",\"spanFakeButton\":\"styles_spanFakeButton__3llCK\",\"buttons\":\"styles_buttons__IMQPb\",\"formikErrors\":\"styles_formikErrors__2RQoJ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"styles_header__UtXw2\",\"content\":\"styles_content__2ET2U\",\"flexButton\":\"styles_flexButton__1Utg3\",\"formikErrors\":\"styles_formikErrors__3bQPl\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"body\":\"styles_body__2Q-wJ\",\"logo\":\"styles_logo__mPWSL\",\"logoImg\":\"styles_logoImg__ZgPm6\",\"inputText\":\"styles_inputText__2xnuv\",\"errorMessage\":\"styles_errorMessage__1KVgr\",\"error\":\"styles_error__1y9yL\",\"loading\":\"styles_loading__1DbBf\",\"linkBack\":\"styles_linkBack__3zRXb\",\"message\":\"styles_message__2KhCr\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__9r1O1\",\"divSelectCompany\":\"styles_divSelectCompany__FWW62\",\"selectCompany\":\"styles_selectCompany__14--d\",\"gridCompanyInfo\":\"styles_gridCompanyInfo__3olvY\",\"saveButton\":\"styles_saveButton__3_gvW\",\"containerCheckBoxInput\":\"styles_containerCheckBoxInput__3PyNK\",\"labelImplantation\":\"styles_labelImplantation__1MByu\",\"inputSelectModality\":\"styles_inputSelectModality__2DkB5\"};","var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\nvar __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx } from \"react/jsx-runtime\";\r\nimport React, { createContext, useEffect, useState } from \"react\";\r\nimport { css } from \"@emotion/react\";\r\nimport ClipLoader from \"react-spinners/ClipLoader\";\r\nvar override = css(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n  display: block;\\n  margin: 0 auto;\\n  border-color: #2f2f2f;\\n\"], [\"\\n  display: block;\\n  margin: 0 auto;\\n  border-color: #2f2f2f;\\n\"])));\r\nexport var AuthContext = createContext({});\r\nexport function AuthContextProvider(props) {\r\n    var _this = this;\r\n    var _a = useState(true), loading = _a[0], setLoading = _a[1];\r\n    var _b = useState(), login = _b[0], setLogIn = _b[1];\r\n    useEffect(function () {\r\n        var loadStorageData = function () { return __awaiter(_this, void 0, void 0, function () {\r\n            var storegedtoken;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0: return [4 /*yield*/, localStorage.getItem('token')];\r\n                    case 1:\r\n                        storegedtoken = _a.sent();\r\n                        if (storegedtoken) {\r\n                            handleSetLogin(storegedtoken);\r\n                        }\r\n                        setLoading(false);\r\n                        return [2 /*return*/];\r\n                }\r\n            });\r\n        }); };\r\n        loadStorageData();\r\n    }, []);\r\n    var handleSetLogin = function (token) { return __awaiter(_this, void 0, void 0, function () {\r\n        var payload, name, company, companyId, role, login_1, expiresIn, hasPluginMaker, e_1;\r\n        return __generator(this, function (_a) {\r\n            switch (_a.label) {\r\n                case 0:\r\n                    _a.trys.push([0, 2, , 3]);\r\n                    payload = token.split(\".\")[1];\r\n                    payload = atob(payload);\r\n                    payload = JSON.parse(payload);\r\n                    name = decodeURIComponent(escape(payload.UserName));\r\n                    company = decodeURIComponent(escape(payload.CompanyName));\r\n                    companyId = payload.CompanyId;\r\n                    role = decodeURIComponent(escape(payload.role));\r\n                    login_1 = decodeURIComponent(escape(payload.UserId));\r\n                    expiresIn = payload.exp;\r\n                    hasPluginMaker = payload.HasPluginMaker;\r\n                    return [4 /*yield*/, setLogIn({\r\n                            token: token,\r\n                            name: name,\r\n                            role: role,\r\n                            company: company,\r\n                            login: login_1,\r\n                            expiresIn: expiresIn,\r\n                            companyId: companyId,\r\n                            hasPluginMaker: hasPluginMaker\r\n                        })];\r\n                case 1:\r\n                    _a.sent();\r\n                    if (!login_1) {\r\n                        handleLogout();\r\n                    }\r\n                    localStorage.setItem('token', token);\r\n                    return [3 /*break*/, 3];\r\n                case 2:\r\n                    e_1 = _a.sent();\r\n                    handleLogout();\r\n                    return [3 /*break*/, 3];\r\n                case 3: return [2 /*return*/];\r\n            }\r\n        });\r\n    }); };\r\n    var handleLogout = function () {\r\n        setLogIn(undefined);\r\n        localStorage.removeItem('token');\r\n    };\r\n    if (loading) {\r\n        return (_jsx(\"div\", __assign({ className: 'flex h-full w-full items-center justify-center' }, { children: _jsx(\"div\", __assign({ className: 'flex row' }, { children: _jsx(ClipLoader, { css: override, loading: loading, size: 16 }, void 0) }), void 0) }), void 0));\r\n    }\r\n    return (_jsx(AuthContext.Provider, __assign({ value: { login: login, handleSetLogin: handleSetLogin, handleLogout: handleLogout } }, { children: props.children }), void 0));\r\n}\r\nvar templateObject_1;\r\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASsAAABqCAMAAADTCYf7AAAKN2lDQ1BzUkdCIElFQzYxOTY2LTIuMQAAeJydlndUU9kWh8+9N71QkhCKlNBraFICSA29SJEuKjEJEErAkAAiNkRUcERRkaYIMijggKNDkbEiioUBUbHrBBlE1HFwFBuWSWStGd+8ee/Nm98f935rn73P3Wfvfda6AJD8gwXCTFgJgAyhWBTh58WIjYtnYAcBDPAAA2wA4HCzs0IW+EYCmQJ82IxsmRP4F726DiD5+yrTP4zBAP+flLlZIjEAUJiM5/L42VwZF8k4PVecJbdPyZi2NE3OMErOIlmCMlaTc/IsW3z2mWUPOfMyhDwZy3PO4mXw5Nwn4405Er6MkWAZF+cI+LkyviZjg3RJhkDGb+SxGXxONgAoktwu5nNTZGwtY5IoMoIt43kA4EjJX/DSL1jMzxPLD8XOzFouEiSniBkmXFOGjZMTi+HPz03ni8XMMA43jSPiMdiZGVkc4XIAZs/8WRR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vX19vn5+fr6+/z8/P////7+/gAAABav6H0AAABBdFJOU/////////////////////////////////////////////////////////////////////////////////////8AMFXsxwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAEYZJREFUeJztXXl32rgWB2wwq9kJJJCQhLRpO9OZvk/wvv8fbzqdaZo9IQlLCGExq1nMy0J1ZVuLTUI5Pad3zpkKbGzpp7vrShH/6/h5qH2gPvxf/s2zmteLq3ntQtT7d/z4j1LLrub9PxFW48Pxc+P2F1Y8qnTmjd5UWEkHfh6shpffW9ovrDhU1VDTtZoe/DRYzSqoKa6o0z8NVi0VNQMr6sJPg5UCzV9YcagOzV9YsWnYgbZ3RX34WbDCRNDhX1Ef7GI1Hk8159QhON2CeykdohDOVr4f+WKMLGOl9gdqbzicwDdSIPjw3zI6RaAmNGM/6JUmsoRVt9Nr9kzfqmrD4fClI+FX75SZ1C60gz/gfUTiYjVrKXdd+uXBhSOxEX3NHhEJ78GqzCAPq3azorLveLDm9fUt6bX6Q6E+NN3ykt9FJRZW40ZJYVwGKjf3lyyIWD+izuW+ik50rAZ3NyOrTxl8eR9/le5QSGtBe2WqnYrVoHY1tfGY6cHHZXJWfwztVXkMNKxG5Ws7SD3Q9PSPJbq1A2h6VqauiFhpd2eWpQ9Rp5F6eW9ohGEVX5m6ImHVvbgn3+v2+z1ul+ASptpUGw6Use7q/RKxwrz21bEVAava8cR8mxSXJb/BMZh1lVvMPrVfuWc4Yc8OLfE1HDJiNS1eGW9xxWJhkv/nDIU2mmfIS1yibAxBJfhX5rWbsBqf3hpukNNxhqMZ/fjPd/lYojuKxVeJ5b2FS3qsxkd13WdXJsVxBTxv/jd7bi1ROIbQjCzvLVzSYTU70UHlymX4abVQer5osESsgK9cKxRBPVbXNfxTJmcpqZacY7VEAwVmMLKiUoYnwrFqXWAfvHsWo5a52peXl9mdAF+tLsBx6LAaH8/gQ3rH6gxK3id1sv6KnTLQAFZRV+hd6bC6xRIf+U3ra7uBR6wCS4ydISskrix39fR21BpjjlU+b+MRj3l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hLUacN8oANOQuHJIXnGqo3iDXUuPC5W4O7KbvDy2769A84drgLfWcDZjpyycO79xdtLnaWWqyqH7JzRnEKFZ0X4/BgzrCyoUjkLu/9TXdOhrjryEj0zA+FYUfYyB95+ZT5CZJyU0bQClbi9Nsf6+R/KAchESmxa2yi3NSKfv/FM2U0r7o4bU920cSX3DylXHilSYBhA6qkXQGI2g0ToCasR0SCTiH84KyKh4KIeOBKwdLbLA4Wws/po96QdRzQc3dsZVgEmd7oC6/jxC089sCS1Tz+N2TgSRCz4z4miLG0nrLp1QUi10c1u2nNIPENdyK6z1SpbQIR0Qn8qy1OnJdnC35XwrMVsHCL1SK6sTDhvJ7CRtH7kFyjGEIOfY5+KZnn3rK/xJjYcpp7cIsSfjvzQ0fMEF/7mnDbhS8ZCC4Se8qd6RWc3pJQ9wMOoTj/Pus23v16t4jwsJuIR/ow435JPv/AnwiGCfD5jJf9xSFdZrmg0FFrwUCxnMtlVur3hRBMkb8AXDNo8uVzcmq9fFDjVzLK8pSj9/ngiuqWgz88vm3ki/6ebsp5LxJAcDFHEff5M+T+1MmnfoBiOhPwvO10m+KLjntPKY2pD2OMnyqXkAqk8aTfX7fVGk5kgCJJblCTW2X7f8RfX1zu9TncA+1/8DySxNhn/EBL2Yy0tGF/en4bzxCyfsfx/ds1VF/48al0AAAAASUVORK5CYII=\"","var apiUrl = 'https://helpapi.solostecnologia.com.br:19488/api/'; // PRODU��O\r\n//const apiUrl = 'https://testehelpapi.solostecnologia.com.br/api/' // TODO: TESTE\r\n//const apiUrl = 'https://localhost:44313/api/' // TODO: TESTE LOCAL\r\nexport default apiUrl;\r\n","import axios from 'axios';\r\nimport apiUrl from '../services/apiUrl';\r\n//axios.defaults.headers.common['Accept-Encoding'] = 'gzip'\r\nvar api = axios.create({\r\n    baseURL: apiUrl\r\n});\r\nexport default api;\r\n","import { useContext } from 'react';\r\nimport { AuthContext } from '../context/authContext';\r\nvar useAuth = function () {\r\n    var value = useContext(AuthContext);\r\n    return value;\r\n};\r\nexport default useAuth;\r\n","var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\nvar __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\r\n    for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n        to[j] = from[i];\r\n    return to;\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\r\nimport { useState } from 'react';\r\nimport { Link } from 'react-router-dom';\r\nimport { CSVLink } from \"react-csv\";\r\nimport { RiFileExcel2Line } from 'react-icons/ri';\r\nimport Button from '../Button';\r\nimport Alert from '../Alert';\r\nimport { css } from \"@emotion/react\";\r\nimport ClipLoader from \"react-spinners/ClipLoader\";\r\nimport CurrencyInput from 'react-currency-input-field';\r\nimport './styles.css';\r\nvar override = css(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n  display: block;\\n  margin: 0 auto;\\n  border-color: #2f2f2f;\\n\"], [\"\\n  display: block;\\n  margin: 0 auto;\\n  border-color: #2f2f2f;\\n\"])));\r\nvar Table = function (props) {\r\n    var _a = useState(), line = _a[0], setLine = _a[1];\r\n    var _b = useState([]), showComments = _b[0], setShowComments = _b[1];\r\n    var _c = useState(-1), showBtnEdit = _c[0], setShowBtnEdit = _c[1];\r\n    function changeItems(e, line, position) {\r\n        setShowBtnEdit(line);\r\n        var valueInsideTable = __spreadArray([], props.data);\r\n        valueInsideTable[line][position] = e.target.value;\r\n        props.setData(valueInsideTable);\r\n        props.setIdToChange(0);\r\n    }\r\n    function changeItemsMonay(e, line, position) {\r\n        setShowBtnEdit(line);\r\n        var valueInsideTable = __spreadArray([], props.data);\r\n        var decimalValue = e.target.value.replace('R$', '').replace('.', '');\r\n        valueInsideTable[line][position] = decimalValue;\r\n        props.setData(valueInsideTable);\r\n        props.setIdToChange(0);\r\n    }\r\n    function changeItemsSelect(e, line, position) {\r\n        return __awaiter(this, void 0, void 0, function () {\r\n            var valueInsideTable;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        setShowBtnEdit(line);\r\n                        valueInsideTable = __spreadArray([], props.data);\r\n                        valueInsideTable[line][position].id = e.target.value.split(',')[0];\r\n                        valueInsideTable[line][position].name = e.target.value.split(',')[1];\r\n                        if (!(position === 'select_state')) return [3 /*break*/, 3];\r\n                        return [4 /*yield*/, props.changeExistentContent(valueInsideTable[line])];\r\n                    case 1:\r\n                        _a.sent();\r\n                        return [4 /*yield*/, props.setData(valueInsideTable)];\r\n                    case 2:\r\n                        _a.sent();\r\n                        return [2 /*return*/, props.setIdToChange(props.data[line].id)];\r\n                    case 3: return [4 /*yield*/, props.setData(valueInsideTable)];\r\n                    case 4:\r\n                        _a.sent();\r\n                        return [2 /*return*/, props.setIdToChange(0)];\r\n                }\r\n            });\r\n        });\r\n    }\r\n    var changeTable = function (index) { return __awaiter(void 0, void 0, void 0, function () {\r\n        return __generator(this, function (_a) {\r\n            switch (_a.label) {\r\n                case 0: return [4 /*yield*/, props.changeExistentContent(props.data[index])];\r\n                case 1:\r\n                    _a.sent();\r\n                    setShowBtnEdit(-1);\r\n                    return [2 /*return*/, props.setIdToChange(props.data[index].id)];\r\n            }\r\n        });\r\n    }); };\r\n    var highLightLineAndLineFn = function (id, fn) {\r\n        var _a;\r\n        fn(id);\r\n        (_a = props.lineButton) === null || _a === void 0 ? void 0 : _a.map(function (lineBtn) {\r\n            return setLine(id);\r\n        });\r\n    };\r\n    var selectedComments = function (val) {\r\n        if (showComments.includes(val)) {\r\n            var newComments = showComments;\r\n            var comments = newComments.filter(function (item) { return item !== val; });\r\n            setShowComments(comments);\r\n        }\r\n        else {\r\n            setShowComments(__spreadArray(__spreadArray([], showComments), [val]));\r\n        }\r\n    };\r\n    var data = props.data;\r\n    var columns = props.columns;\r\n    var page = props.page;\r\n    var size = props.size;\r\n    // fixing date\r\n    columns.map(function (col) {\r\n        if (col.maxLenghtToShowSeeMore == null || col.maxLenghtToShowSeeMore == undefined) {\r\n            col.maxLenghtToShowSeeMore = 49;\r\n        }\r\n        data.map(function (dat) {\r\n            if (col.key.substr(0, 4).includes('date') && dat[col.key]) {\r\n                var fullDate = String(dat[col.key]).split('.')[0];\r\n                var dateTime = fullDate.split('T').join(' / ');\r\n                if (col.key.includes('dateLast') && dat[col.key]) {\r\n                    dat[col.key] = dat[col.key];\r\n                }\r\n                else {\r\n                    dat[col.key] = props.editable ? dateTime.split('/')[0].trim() : dateTime.split('/')[0];\r\n                }\r\n            }\r\n            return data;\r\n        });\r\n        return data;\r\n    });\r\n    var pageBack = function () { return __awaiter(void 0, void 0, void 0, function () {\r\n        return __generator(this, function (_a) {\r\n            switch (_a.label) {\r\n                case 0:\r\n                    if (!(page > 1)) return [3 /*break*/, 4];\r\n                    if (!!page) return [3 /*break*/, 2];\r\n                    return [4 /*yield*/, props.setPage(1)];\r\n                case 1:\r\n                    _a.sent();\r\n                    return [3 /*break*/, 4];\r\n                case 2: return [4 /*yield*/, props.setPage(parseInt(String(page)) - 1)];\r\n                case 3:\r\n                    _a.sent();\r\n                    _a.label = 4;\r\n                case 4: return [2 /*return*/];\r\n            }\r\n        });\r\n    }); };\r\n    var pageUp = function () { return __awaiter(void 0, void 0, void 0, function () {\r\n        return __generator(this, function (_a) {\r\n            switch (_a.label) {\r\n                case 0:\r\n                    if (!props.hasNext) return [3 /*break*/, 4];\r\n                    if (!!page) return [3 /*break*/, 2];\r\n                    return [4 /*yield*/, props.setPage(1)];\r\n                case 1:\r\n                    _a.sent();\r\n                    return [3 /*break*/, 4];\r\n                case 2: return [4 /*yield*/, props.setPage(parseInt(String(page)) + 1)];\r\n                case 3:\r\n                    _a.sent();\r\n                    _a.label = 4;\r\n                case 4: return [2 /*return*/];\r\n            }\r\n        });\r\n    }); };\r\n    if (props.loading) {\r\n        return (_jsx(\"div\", __assign({ className: 'loadingContainer flex h-full w-full items-center justify-center' }, { children: _jsx(\"div\", __assign({ className: 'loadingContentflex row' }, { children: _jsx(ClipLoader, { css: override, loading: true, size: 16 }, void 0) }), void 0) }), void 0));\r\n    }\r\n    return (_jsxs(_Fragment, { children: [props.title &&\r\n                _jsxs(\"div\", __assign({ className: 'tableHeader' }, { children: [_jsxs(\"div\", { children: [_jsxs(\"span\", __assign({ className: 'tableHeaderTitle ' }, { children: [props.title, \" - \"] }), void 0), _jsxs(\"span\", __assign({ className: 'tableHeaderLength ' }, { children: [data.length, \" Registros \"] }), void 0)] }, void 0), _jsx(\"div\", { children: _jsxs(\"div\", __assign({ className: 'tableHeaderButtons ' }, { children: [props.exporter &&\r\n                                        _jsx(CSVLink, __assign({ className: 'tableHeaderButtonChild ', separator: ';', filename: \"my-file.csv\", data: data, headers: columns }, { children: _jsx(RiFileExcel2Line, { title: 'Exportar excel' }, void 0) }), void 0), props.headerButtons &&\r\n                                        _jsx(_Fragment, { children: props.headerButtons.map(function (button) { return (_jsx(\"div\", { children: _jsx(\"a\", __assign({ className: 'tableHeaderButtonChild', title: button.title, onClick: button.fn }, { children: button.icon }), void 0) }, (button.id + 800))); }) }, void 0)] }), void 0) }, void 0)] }), void 0), _jsx(\"div\", __assign({ className: 'tableContainer' }, { children: _jsxs(\"table\", __assign({ className: 'tableContent  ' }, { children: [_jsx(\"thead\", { children: _jsxs(\"tr\", { children: [columns.map(function (item, index) { return (_jsx(\"th\", __assign({ className: 'tableHead ' }, { children: item.label }), index + 900)); }), props.lineButton &&\r\n                                        _jsx(_Fragment, { children: props.lineButton.map(function (linebtn, index) { return (_jsx(\"th\", __assign({ className: 'tableHead' }, { children: linebtn.name }), index + 200)); }) }, void 0), props.lineButtonForEach &&\r\n                                        _jsx(_Fragment, { children: props.lineButtonForEach.map(function (linebtn, index) { return (_jsx(\"th\", { className: 'tableHead ' }, index)); }) }, void 0), props.editable &&\r\n                                        _jsx(\"th\", { className: ' tableHead' }, void 0)] }, void 0) }, void 0), _jsx(\"tbody\", { children: props.data.map(function (content, index1) {\r\n                                return (_jsxs(\"tr\", __assign({ className: \" \" + (content.viewed !== undefined ? (!content.viewed ? 'bg-gray-300' : null) : null) + \" \" + (line === content.id ?\r\n                                        'contendId' : null) }, { children: [!props.editable ?\r\n                                            _jsx(_Fragment, { children: columns.map(function (column, index) { return (_jsx(\"td\", __assign({ style: { fontSize: '0.85rem' }, className: (showComments.includes(content.id) ? 'wrap' : 'tdata') + \" \" + (content.viewed !== undefined ? (!content.viewed && 'font-bold') : null) + \" \" }, { children: column.eventClick ?\r\n                                                        _jsx(_Fragment, { children: _jsx(\"span\", __assign({ style: { cursor: 'pointer' }, onClick: function () {\r\n                                                                    if (column.eventClick) {\r\n                                                                        column.eventClick(content.id); // Só chama a função se ela estiver definida\r\n                                                                    }\r\n                                                                } }, { children: content.id }), void 0) }, void 0)\r\n                                                        :\r\n                                                            _jsx(_Fragment, { children: column.key.substr(0, 4).includes('date') && content[column.key] !== null ? column.key.includes('dateLast') ? new Intl.DateTimeFormat('pt-BR', {\r\n                                                                    dateStyle: 'short', timeStyle: 'medium'\r\n                                                                }).format(new Date(content[column.key])) : new Intl.DateTimeFormat('pt-BR', {}).format(new Date(content[column.key]))\r\n                                                                    : _jsxs(_Fragment, { children: [!showComments.includes(content.id) ? column.label === 'Valor' ?\r\n                                                                                new Intl.NumberFormat('pt-BR', {\r\n                                                                                    style: 'currency',\r\n                                                                                    currency: 'BRL'\r\n                                                                                }).format(content[column.key]) : String(content[column.key]).substr(0, column.maxLenghtToShowSeeMore + 10) : String(content[column.key]), String((content[column.key])).length > column.maxLenghtToShowSeeMore && !showComments.includes(content.id) && _jsx(\"span\", __assign({ onClick: function () { return selectedComments(content.id); }, className: 'morInfo' }, { children: \"...ver mais\" }), void 0), String((content[column.key])).length > column.maxLenghtToShowSeeMore && showComments.includes(content.id) && _jsx(\"span\", __assign({ onClick: function () { return selectedComments(content.id); }, className: 'morInfo' }, { children: \" ver menos\" }), void 0)] }, void 0) }, void 0) }), index + 300)); }) }, void 0)\r\n                                            :\r\n                                                _jsx(_Fragment, { children: columns.map(function (column, index) { return (_jsx(\"td\", __assign({ style: { fontSize: '0.75rem' }, className: \" tdataEditable\" }, { children: String(column.key).includes('select') ?\r\n                                                            _jsxs(\"select\", __assign({ onChange: function (e) { return changeItemsSelect(e, (index1), column.key); }, name: column.key, value: content[column.key], className: \"tdataSelectInput \" + (line === content.id ? 'contendId' : '') }, { children: [_jsx(\"option\", __assign({ hidden: true }, { children: content[column.key].name }), void 0), content[column.key].select.map(function (item, index) { return (_jsx(\"option\", __assign({ value: [item.id, item.name], className: 'text-gray-600' }, { children: item.name }), index)); })] }), void 0)\r\n                                                            : String(content[column.key]).length < 40 ?\r\n                                                                _jsxs(_Fragment, { children: [column.label === 'Valor' ?\r\n                                                                            _jsx(CurrencyInput, { className: \"tdataSelectInput \" + (line === content.id ? 'contendId' : ''), name: column.key, prefix: \"R$\", placeholder: \"Please enter a number\", value: content[column.key], decimalsLimit: 2, onChange: function (e) { return changeItemsMonay(e, (index1), column.key); } }, void 0)\r\n                                                                            :\r\n                                                                                _jsx(\"input\", { disabled: column.key === 'id', className: \"tdataSelectInput \" + (line === content.id ? 'contendId' : ''), name: column.key, onChange: function (e) { return changeItems(e, (index1), column.key); }, type: column.key.substr(0, 4).includes('date') ? (column.key.includes('dateLast') ? 'datetime-local' : 'date') : 'text', value: content[column.key] !== null ? content[column.key] : '' }, void 0), \" \"] }, void 0)\r\n                                                                : _jsx(\"textarea\", { disabled: column.key === 'id', className: \"tdataSelectInput tdataTextArea \" + (line === content.id ? 'contendId' : ''), name: column.key, onChange: function (e) { return changeItems(e, (index1), column.key); }, value: content[column.key] !== null ? content[column.key] : '' }, void 0) }), index + 100)); }) }, void 0), props.lineButton &&\r\n                                            _jsx(_Fragment, { children: props.lineButton.map(function (lineBtn, index) { return (_jsx(\"td\", __assign({ style: { fontSize: '0.70rem' }, className: lineBtn.hideWithCondition && content.hideButton ? 'lineButtonHidden' : 'lineButton', onClick: function () {\r\n                                                        if (lineBtn.hideWithCondition && content.hideButton) {\r\n                                                            null;\r\n                                                        }\r\n                                                        else {\r\n                                                            if (!props.highLightLine) {\r\n                                                                lineBtn === null || lineBtn === void 0 ? void 0 : lineBtn.fn(content.id);\r\n                                                            }\r\n                                                            else {\r\n                                                                highLightLineAndLineFn(content.id, lineBtn.fn);\r\n                                                            }\r\n                                                        }\r\n                                                    } }, { children: lineBtn.hideWithCondition && content.hideButton ? null : lineBtn.icon }), index + 400)); }) }, void 0), props.lineButtonForEach &&\r\n                                            _jsx(_Fragment, { children: props.lineButtonForEach.map(function (lineBtn, index) { return (_jsx(_Fragment, { children: lineBtn.id === content.id ?\r\n                                                        _jsx(\"td\", __assign({ title: lineBtn.name, className: \"lineButtonForEach \", onClick: function () { return lineBtn === null || lineBtn === void 0 ? void 0 : lineBtn.fn(content.id); } }, { children: lineBtn.icon }), index) :\r\n                                                        _jsx(\"td\", { className: \"lineButtonForEach \" }, index) }, void 0)); }) }, void 0), props.editable &&\r\n                                            _jsx(_Fragment, { children: showBtnEdit === index1 ?\r\n                                                    _jsx(\"td\", __assign({ className: \"editButton\" }, { children: _jsx(Button, __assign({ lineBtn: true, onClick: function () { return changeTable(index1); } }, { children: \"Salvar\" }), void 0) }), void 0)\r\n                                                    :\r\n                                                        _jsx(\"td\", { className: \"editButton\" }, void 0) }, void 0)] }), index1));\r\n                            }) }, void 0)] }), void 0) }), void 0), !data.length ?\r\n                _jsxs(Alert, __assign({ info: true }, { children: [\"N\\u00E3o h\\u00E1 \", props.title, \" at\\u00E9 o momento.\"] }), void 0)\r\n                :\r\n                    _jsx(_Fragment, { children: size &&\r\n                            _jsxs(\"div\", __assign({ className: \"tableFooterContent\" }, { children: [_jsx(\"div\", {}, void 0), _jsx(\"div\", __assign({ className: 'tablepageChanger' }, { children: _jsxs(_Fragment, { children: [_jsx(Link, __assign({ to: \"#\", onClick: pageBack, className: \"tablepageTransaction  \" + (page === 1 ? 'cursor-not-allowed ' : 'tableHovered ') }, { children: \"Anterior\" }), void 0), _jsxs(\"span\", __assign({ className: \"curretPage \" }, { children: [_jsx(\"input\", { className: 'tableInputPageChanger', value: page, onChange: function (e) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {\r\n                                                                switch (_a.label) {\r\n                                                                    case 0: return [4 /*yield*/, props.setPage(e.target.value > props.totalPAges ? 1 : e.target.value)];\r\n                                                                    case 1: return [2 /*return*/, _a.sent()];\r\n                                                                }\r\n                                                            }); }); } }, void 0), _jsx(\"span\", __assign({ className: 'tableBotomSpan' }, { children: \" de \" }), void 0), \" \", props.totalPAges] }), void 0), _jsx(Link, __assign({ onClick: pageUp, to: \"#\", className: \"tablepageTransaction \" + (props.hasNext === false ? 'cursor-not-allowed ' : 'tableHovered ') }, { children: \"Pr\\u00F3xima\" }), void 0)] }, void 0) }), void 0), _jsxs(\"div\", __assign({ className: \"tableLinesPerPageContainer flex items-center px-4 py-2 mx-1 \" }, { children: [_jsx(\"label\", __assign({ className: '' }, { children: \"Linhas por p\\u00E1gina:\" }), void 0), _jsx(\"input\", { className: 'tableInputLinesPerPage block w-8 ml-1 px-1 bg-grey-lighter text-center text-grey-darker border border-grey-lighter rounded-sm', value: size, onChange: function (e) { return props.setSize(e.target.value); } }, void 0)] }), void 0)] }), void 0) }, void 0)] }, void 0));\r\n};\r\nexport default Table;\r\nvar templateObject_1;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx } from \"react/jsx-runtime\";\r\nimport './styles.css';\r\nvar Alert = function (props) {\r\n    return (_jsx(\"div\", __assign({ className: \"alert \" + (props.success ? 'successAlert' : props.info ? 'infoAlert' : 'dangerAlert') + \" \", role: 'alert' }, { children: _jsx(\"span\", __assign({ className: 'text' }, { children: props.children }), void 0) }), void 0));\r\n};\r\nexport default Alert;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx } from \"react/jsx-runtime\";\r\nimport './styles.css';\r\nvar Button = function (props) {\r\n    return (_jsx(\"button\", __assign({ type: props.type, onClick: props.onClick, className: \"buttonComponent \" + (props.lineBtn ? 'lineBtn' : '') }, { children: props.children }), void 0));\r\n};\r\nexport default Button;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx } from \"react/jsx-runtime\";\r\nimport './styles.css';\r\nvar DropContainer = function (props) {\r\n    var borderMEssege;\r\n    if (props.isDragActive) {\r\n        borderMEssege = 'border-green';\r\n    }\r\n    if (props.isDragReject) {\r\n        borderMEssege = 'border-red';\r\n    }\r\n    if (props.fileRejections.length > 0 && props.isDragActive) {\r\n        borderMEssege = 'border-red';\r\n    }\r\n    return (_jsx(\"div\", __assign({}, props.rootProps(), { className: \"borderUploader \" + borderMEssege }, { children: props.children }), void 0));\r\n};\r\nexport default DropContainer;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { MdCheckCircle, MdError } from 'react-icons/md';\r\nimport './styles.css';\r\nvar FileList = function (_a) {\r\n    var images = _a.images, deleteButton = _a.deleteButton;\r\n    return (_jsx(\"ul\", __assign({ className: 'FileListUl' }, { children: images.map(function (image, index) { return (_jsxs(\"li\", __assign({ className: 'FileListLi' }, { children: [_jsxs(\"div\", __assign({ className: 'fileinfo flex items-center' }, { children: [_jsx(\"div\", { style: {\r\n                                backgroundImage: \"url( \" + image.preview + \"  )\",\r\n                                height: '36px',\r\n                                width: '36px',\r\n                                borderRadius: '5px',\r\n                                backgroundPosition: '50% 50%',\r\n                                backgroundSize: 'cover',\r\n                                backgroundRepeat: 'no-repeat'\r\n                            } }, void 0), _jsxs(\"div\", __assign({ className: 'fileText flex flex-col ml-1' }, { children: [_jsx(\"strong\", { children: image.name }, void 0), _jsxs(\"span\", __assign({ className: ' text-gray-300 mt-2' }, { children: [image.readableSize, _jsx(\"button\", __assign({ className: 'ml-1 border-0 bg-transparent text-red-600 font-semibold', onClick: function () { return deleteButton(image.id); } }, { children: \"Excluir\" }), void 0)] }), void 0)] }), void 0)] }), void 0), _jsx(\"div\", __assign({ className: '.fileError flex mt-2 items-center' }, { children: image.error ?\r\n                        _jsx(MdError, { title: 'Arquivo muito grande', className: 'error mr-4 text-sm text-red-600' }, void 0)\r\n                        :\r\n                            _jsx(MdCheckCircle, { className: 'success mr-4 text-sm text-blue-200' }, void 0) }), void 0)] }), index)); }) }), void 0));\r\n};\r\nexport default FileList;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\r\nimport './styles.css';\r\nvar InputText = function (props) {\r\n    var value = String(props.inicialValue);\r\n    if (props.label.includes('Data')) {\r\n        value = value.split('T').join(' / ');\r\n    }\r\n    return (_jsx(_Fragment, { children: _jsxs(\"div\", __assign({ className: \"containerTextInput   \" }, { children: [_jsxs(\"label\", __assign({ hidden: props.invisible === true ? true : false, className: \"textInputLabel  \" }, { children: [props.label, \":\"] }), void 0), _jsx(\"input\", __assign({ name: props.name, placeholder: props.placeholder, onChange: props.onChange, disabled: props.disabled }, (props.inicialValue != undefined ? { value: value || '' } : {}), { type: props.isPassword === true ? 'password' : 'text', hidden: props.invisible === true ? true : false, className: \"textInput \" + (props.resize ? 'textInputWidthResized' : 'textInputWidthDefault'), maxlength: props.maxLength }), void 0)] }), void 0) }, void 0));\r\n};\r\nexport default InputText;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\r\nimport './styles.css';\r\nvar Select = function (props) {\r\n    var values = props.values.options;\r\n    var label = props.values.label;\r\n    var valueMember = props.valueMember;\r\n    var displayMember = props.displayMember;\r\n    return (_jsx(_Fragment, { children: _jsxs(\"div\", __assign({ className: \"selectContainer  \" }, { children: [_jsxs(\"label\", __assign({ className: \"selectLabel \" }, { children: [label, \":\"] }), void 0), _jsxs(\"select\", __assign({ onChange: props.onChange, name: props.name }, (props.value != undefined ? { value: props.value || '' } : {}), { disabled: props.disabled, className: \"selectInput \" + (props.resize ? 'selectInputWidthResized' : 'selectInputWidthDefault') }, { children: [props.firstOption ?\r\n                            _jsx(_Fragment, { children: _jsx(\"option\", __assign({ value: '' || 0, hidden: true, className: 'text-gray-600' }, { children: props.firstOption }), void 0) }, void 0)\r\n                            :\r\n                                _jsx(\"option\", __assign({ value: '', hidden: props.notNull, className: 'text-gray-600' }, { children: \"Selecione...\" }), void 0), values.map(function (item, index) { return (_jsx(\"option\", __assign({ value: item[valueMember], className: 'text-gray-600' }, { children: item[displayMember] }), index)); })] }), void 0)] }), void 0) }, void 0));\r\n};\r\nexport default Select;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\r\nimport './styles.css';\r\nvar DateInput = function (props) {\r\n    var value = String(props.inicialValue);\r\n    return (_jsx(_Fragment, { children: _jsxs(\"div\", __assign({ className: 'containerDateInput' }, { children: [_jsxs(\"label\", __assign({ className: \"dateInputLabel\" }, { children: [props.label, \":\"] }), void 0), _jsx(\"div\", { children: _jsx(\"input\", __assign({ onChange: props.onChange, name: props.name }, (props.inicialValue != undefined ? { value: value || '' } : {}), { type: 'date', className: \"dateInput  \" + (props.resize ? 'dateInputWidthResized' : 'dateInputWidthDefault') }), void 0) }, void 0)] }), void 0) }, void 0));\r\n};\r\nexport default DateInput;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\r\nimport './styles.css';\r\nvar TextBox = function (props) {\r\n    return (_jsxs(\"div\", __assign({ style: { width: !!props.width ? props.width : '70%' }, className: \"textBoxContainer \" + (!!props.height ? 'h-' + props.height : 'h-1/6') + \" py-4 \" }, { children: [_jsxs(\"label\", __assign({ className: \"textBoxLabel block font-semibold mb-2 text-gray-600 \" }, { children: [props.label, \":\"] }), void 0), _jsx(\"textarea\", { onChange: props.onChange, name: props.name, disabled: props.disabled, value: props.inicialValue, className: \"textBoxInput block w-full h-24 px-4 py-2 text-gray-700 bg-white border border-gray-300 rounded-sm focus:border-blue-500 focus:outline-none focus:ring\", maxlength: props.maxLength }, void 0)] }), void 0));\r\n};\r\nexport default TextBox;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\r\n    for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n        to[j] = from[i];\r\n    return to;\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\n// Componente de Menu lateral\r\nimport { Link } from 'react-router-dom';\r\nimport { useState } from 'react';\r\nimport './styles.css';\r\nimport { AiOutlineMenu } from 'react-icons/ai';\r\nimport { GrClose } from 'react-icons/gr';\r\nimport { BiLogOut } from 'react-icons/bi';\r\nvar SideBar = function (props) {\r\n    var _a, _b, _c, _d;\r\n    var _e = useState(false), isMenuOpen = _e[0], setIsMenuOpen = _e[1];\r\n    var _f = useState([]), currentBranch = _f[0], setCurrentBranch = _f[1];\r\n    function handleOpenCloseMenu() {\r\n        if (isMenuOpen) {\r\n            setIsMenuOpen(false);\r\n            return;\r\n        }\r\n        setIsMenuOpen(true);\r\n    }\r\n    function handleOpenCloseBranches(name) {\r\n        var current = __spreadArray([], currentBranch);\r\n        if (!current.includes(name)) {\r\n            setCurrentBranch(__spreadArray(__spreadArray([], current), [name]));\r\n            return;\r\n        }\r\n        setCurrentBranch(current.filter(function (x) { return x !== name; }));\r\n    }\r\n    return (_jsxs(\"div\", __assign({ className: 'headerTop' }, { children: [_jsx(\"div\", __assign({ className: 'headerContainer' }, { children: _jsxs(\"div\", __assign({ className: \"\" }, { children: [_jsxs(\"div\", __assign({ className: \"headerContent\" }, { children: [_jsxs(\"div\", __assign({ className: \"headerIndex\" }, { children: [_jsx(\"div\", { children: props.Header.logoUrl ?\r\n                                                _jsx(\"img\", { className: 'headerImg', src: props.Header.logoUrl, alt: 'logo' }, void 0)\r\n                                                :\r\n                                                    _jsx(\"h1\", { children: \"LOGO\" }, void 0) }, void 0), _jsxs(\"div\", __assign({ className: 'headerWelcome' }, { children: [_jsxs(\"span\", { children: [\"Ol\\u00E1 \", (_a = props.Header.user) === null || _a === void 0 ? void 0 : _a.name, \",\"] }, void 0), _jsx(\"span\", { children: \"Seja bem-vindo(a)\" }, void 0)] }), void 0)] }), void 0), _jsx(\"div\", { children: _jsx(\"p\", __assign({ className: 'headerTitle' }, { children: props.title }), void 0) }, void 0), _jsxs(\"div\", __assign({ className: \"headerEnd\" }, { children: [_jsx(\"div\", __assign({ className: \"headerEndChild\" }, { children: _jsx(\"p\", __assign({ className: \"\" }, { children: (_b = props.Header.user) === null || _b === void 0 ? void 0 : _b.company }), void 0) }), void 0), _jsx(\"div\", __assign({ className: \"\" }, { children: _jsx(\"div\", __assign({ className: \"headerCircle\" }, { children: (_d = (_c = props.Header.user) === null || _c === void 0 ? void 0 : _c.name) === null || _d === void 0 ? void 0 : _d.substr(0, 1).toUpperCase() }), void 0) }), void 0), _jsx(\"a\", __assign({ title: 'Sair', onClick: props.Header.logOut, className: 'logOutButton' }, { children: _jsx(BiLogOut, {}, void 0) }), void 0)] }), void 0)] }), void 0), _jsxs(\"div\", __assign({ className: 'headerMobileMenu' }, { children: [_jsx(\"a\", __assign({ className: 'headerMenu', onClick: handleOpenCloseMenu }, { children: isMenuOpen ? _jsx(GrClose, {}, void 0) : _jsx(AiOutlineMenu, {}, void 0) }), void 0), _jsx(\"div\", { children: _jsx(\"p\", __assign({ className: 'headerTitleMobile' }, { children: props.title }), void 0) }, void 0), _jsx(\"div\", __assign({ className: \"flexMobile\" }, { children: _jsx(\"a\", __assign({ title: 'Sair', onClick: props.Header.logOut, className: 'logOutButton' }, { children: _jsx(BiLogOut, {}, void 0) }), void 0) }), void 0)] }), void 0)] }), void 0) }), void 0), _jsxs(\"div\", __assign({ className: \"sideBarContainer\" }, { children: [_jsx(\"div\", __assign({ className: \"\" + (isMenuOpen ? 'sideBarMobile' : 'sideBarSize'), id: \"sideBarSizeId\" }, { children: _jsx(\"div\", __assign({ className: 'sideBarContent' }, { children: _jsx(\"div\", { children: _jsx(\"ul\", __assign({ className: \"ulSidebar\" }, { children: props.SideBar.menu.map(function (item, index) { return (_jsx(\"div\", { children: _jsxs(\"li\", { children: [!item.branches ?\r\n                                                    _jsxs(Link, __assign({ to: item.link, onClick: function () { return setIsMenuOpen(false); }, className: \"itemSideBar \" + (props.title === item.name ? 'bg-current-sidebar' : '') }, { children: [_jsx(\"span\", __assign({ className: \"iconSidebar\" }, { children: item.icon }), void 0), _jsx(\"span\", __assign({ className: 'titleSidebar' }, { children: item.name }), void 0)] }), void 0)\r\n                                                    :\r\n                                                        _jsxs(\"span\", __assign({ onClick: function () { return handleOpenCloseBranches(item.name); }, className: \"itemSideBar cursorPointer  \" + (item.branches.filter(function (x) { return props.title === x.name; }).length > 0 ? 'bg-current-sidebar' : '') }, { children: [_jsx(\"span\", __assign({ className: \"iconSidebar\" }, { children: item.icon }), void 0), _jsx(\"span\", __assign({ className: 'titleSidebar' }, { children: item.name }), void 0)] }), void 0), item.branches && currentBranch.includes(item.name) &&\r\n                                                    _jsx(\"ul\", __assign({ className: \"ulSidebar branch\" }, { children: item.branches.map(function (itemBranch, index) { return (_jsx(\"li\", __assign({ className: 'liSideBarBranch' }, { children: _jsxs(Link, __assign({ to: itemBranch.link, onClick: function () { return setIsMenuOpen(false); }, className: \"itemSideBar \" + (props.title === itemBranch.name ? 'bg-current-sidebar' : '') }, { children: [_jsx(\"span\", __assign({ className: \"iconSidebar\" }, { children: itemBranch.icon }), void 0), _jsx(\"span\", __assign({ className: 'titleSidebar' }, { children: itemBranch.name }), void 0)] }), void 0) }), index)); }) }), void 0)] }, void 0) }, index)); }) }), void 0) }, void 0) }), void 0) }), void 0), !isMenuOpen &&\r\n                        _jsx(\"div\", __assign({ className: \"layoutChildren\", id: \"layoutChildrenId\" }, { children: props.children }), void 0)] }), void 0)] }), void 0));\r\n};\r\nexport default SideBar;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\r\nimport { useState } from \"react\";\r\nimport './styles.css';\r\nvar TabContent = function (props) {\r\n    var _a = useState(1), openTab = _a[0], setOpenTab = _a[1];\r\n    return (_jsx(_Fragment, { children: _jsxs(\"div\", __assign({ className: \"tabsContainer  w-full\" }, { children: [_jsx(\"ul\", __assign({ className: \"tabsUl flex flex-row text-center mt-2 \", role: \"tablist\" }, { children: props.contents.map(function (item, index) { return (_jsx(\"li\", __assign({ className: \"tabsLi mb-0 last:mr-0 w-24\" }, { children: _jsx(\"a\", __assign({ style: { fontSize: '0.8rem' }, className: \"tabsTab font-bold  px-2 py-1 rounded-t-lg block leading-normal \" +\r\n                                (openTab === (index + 1)\r\n                                    ? \"tabsActive text-gray-800  bg-gray-200 border border-b-0 \"\r\n                                    : \"tabsDisabled text-gray-400 bg-white\"), onClick: function (e) {\r\n                                e.preventDefault();\r\n                                setOpenTab(index + 1);\r\n                            }, \"data-toggle\": \"tab\", href: \"#link\" + (index + 1), role: \"tablist\" }, { children: item.name }), void 0) }), index)); }) }), void 0), _jsx(\"div\", { className: \"tabsLine w-full h-0.5 bg-gray-200 rounded-t-lg \" }, void 0), props.contents.map(function (item, index) { return (_jsx(\"div\", __assign({ className: \"tabschildContent \" + (openTab === (index + 1) ? \"block\" : \"hidden\"), id: \"link\" + (index + 1) }, { children: item.ComponentVal }), index + 1)); })] }), void 0) }, void 0));\r\n};\r\nexport default TabContent;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx } from \"react/jsx-runtime\";\r\n// componente auxiliar para mensagens do componente Uploader.\r\nimport './styles.css';\r\nvar UploadMessege = function (props) {\r\n    var color = 'text-gray-message';\r\n    if (props.type === 'success') {\r\n        color = 'text-green-message';\r\n    }\r\n    if (props.type === 'error') {\r\n        color = 'text-red-message';\r\n    }\r\n    return (_jsx(\"p\", __assign({ className: color }, { children: props.children }), void 0));\r\n};\r\nexport default UploadMessege;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\n// Componente input de arquivos, drag and drop\r\nimport Dropzone from \"react-dropzone\";\r\nimport DropContainer from \"../DropContainer\";\r\nimport UploadMessege from \"../UploadMessege\";\r\nimport FileList from '../FileList-Uploader';\r\nimport { uniqueId } from 'lodash';\r\nimport filesize from 'filesize';\r\nimport './styles.css';\r\n//Componente para anexar arquivos\r\nvar Uploader = function (props) {\r\n    var renderDragMessege = function (isDragActive, isDragReject, fileRejections) {\r\n        if (!isDragActive) {\r\n            return _jsx(UploadMessege, { children: \"Clique ou arraste seus arquivos\" }, void 0);\r\n        }\r\n        if (fileRejections.length > 0 && !isDragReject) {\r\n            return _jsx(UploadMessege, __assign({ type: 'error' }, { children: \"Arquivos muito grandes\" }), void 0);\r\n        }\r\n        if (isDragReject) {\r\n            return _jsx(UploadMessege, __assign({ type: 'error' }, { children: \"Arquivo n\\uFFFDo suportado\" }), void 0);\r\n        }\r\n        return _jsx(UploadMessege, __assign({ type: 'success' }, { children: \"Solte os arquivos\" }), void 0);\r\n    };\r\n    var handleRemoveFile = function (val) { return __awaiter(void 0, void 0, void 0, function () {\r\n        var newFile, newFiles;\r\n        return __generator(this, function (_a) {\r\n            switch (_a.label) {\r\n                case 0:\r\n                    newFile = props.file;\r\n                    newFiles = newFile[0].filter(function (item) { return item.id !== val; });\r\n                    return [4 /*yield*/, props.stateOfFilesTochange({\r\n                            uploadedFiles: [newFiles]\r\n                        })];\r\n                case 1:\r\n                    _a.sent();\r\n                    return [2 /*return*/];\r\n            }\r\n        });\r\n    }); };\r\n    var uploader = function (files) { return __awaiter(void 0, void 0, void 0, function () {\r\n        var uploadedFiles, newArr, i;\r\n        return __generator(this, function (_a) {\r\n            switch (_a.label) {\r\n                case 0:\r\n                    uploadedFiles = files.map(function (file) { return ({\r\n                        file: file,\r\n                        id: uniqueId(),\r\n                        name: file.name,\r\n                        readableSize: filesize(file.size),\r\n                        preview: URL.createObjectURL(file),\r\n                        progress: 0,\r\n                        uploaded: false,\r\n                        error: file.size > 900000 ? true : false,\r\n                        url: null,\r\n                    }); });\r\n                    newArr = uploadedFiles;\r\n                    if (props.file) {\r\n                        for (i = 0; i < props.file[0].length; i++) {\r\n                            newArr.push(props.file[0][i]);\r\n                        }\r\n                    }\r\n                    return [4 /*yield*/, props.stateOfFilesTochange({\r\n                            uploadedFiles: [newArr]\r\n                        })];\r\n                case 1:\r\n                    _a.sent();\r\n                    if (!props.setHasImg) return [3 /*break*/, 3];\r\n                    return [4 /*yield*/, props.setHasImg(true)];\r\n                case 2:\r\n                    _a.sent();\r\n                    _a.label = 3;\r\n                case 3: return [2 /*return*/];\r\n            }\r\n        });\r\n    }); };\r\n    return (_jsxs(\"div\", __assign({ className: 'containerUploader' }, { children: [_jsx(Dropzone, __assign({ accept: 'image/*', onDropAccepted: function (acepetedFiles) {\r\n                    uploader(acepetedFiles);\r\n                } }, { children: function (_a) {\r\n                    var getRootProps = _a.getRootProps, getInputProps = _a.getInputProps, isDragActive = _a.isDragActive, isDragReject = _a.isDragReject, fileRejections = _a.fileRejections;\r\n                    return ( // fun��o children, padr�o do dropzone\r\n                    _jsxs(DropContainer, __assign({ rootProps: getRootProps, isDragActive: isDragActive, isDragReject: isDragReject, fileRejections: fileRejections }, { children: [_jsx(\"input\", __assign({}, getInputProps()), void 0), renderDragMessege(isDragActive, isDragReject, fileRejections)] }), void 0));\r\n                } }), void 0), !!props.file &&\r\n                _jsx(FileList, { deleteButton: handleRemoveFile, images: props.file[0] }, void 0)] }), void 0));\r\n};\r\nexport default Uploader;\r\n","var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\nvar __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport LogoImg from '../../assets/images/logo_cabecalho.png'; // PRODU��O\r\n//import LogoImg from '../../assets/images/logo_cabecalho_teste.png' // TODO: TESTE\r\nimport { Link, useHistory } from 'react-router-dom';\r\nimport { useFormik } from 'formik';\r\nimport * as Yup from 'yup';\r\nimport api from '../../services/api';\r\nimport useAuth from '../../hooks/useAuth';\r\nimport { useEffect, useState } from 'react';\r\nimport { Alert } from 'template/lib';\r\nimport { css } from \"@emotion/react\";\r\nimport ClipLoader from \"react-spinners/ClipLoader\";\r\nimport styles from './styles.module.scss';\r\nvar override = css(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n  display: block;\\n  margin: 0 auto;\\n  border-color: #2f2f2f;\\n\"], [\"\\n  display: block;\\n  margin: 0 auto;\\n  border-color: #2f2f2f;\\n\"])));\r\nvar userSchema = Yup.object().shape({\r\n    login: Yup.string()\r\n        .required('Por favor, informe um e-mail.'),\r\n    password: Yup.string()\r\n        .required('Por favor, informe uma senha.')\r\n});\r\nvar Login = function () {\r\n    var history = useHistory();\r\n    var _a = useState(false), loading = _a[0], setLoading = _a[1];\r\n    var _b = useState(false), signInError = _b[0], setSignInError = _b[1];\r\n    var _c = useState('Tente novamente mais tarde.'), errMessage = _c[0], setErrorMessage = _c[1];\r\n    var _d = useAuth(), handleSetLogin = _d.handleSetLogin, login = _d.login;\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            login: '',\r\n            password: ''\r\n        }, validationSchema: userSchema,\r\n        onSubmit: function (values) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var response, err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        setLoading(true);\r\n                        _a.label = 1;\r\n                    case 1:\r\n                        _a.trys.push([1, 3, 4, 5]);\r\n                        return [4 /*yield*/, api.post('auth/login', values)];\r\n                    case 2:\r\n                        response = _a.sent();\r\n                        handleSetLogin(response.data.token);\r\n                        // if the url is set to another page besides profile, when you log in you go directly for this page, example: when you receive a email with a link for a specific help, like: http://help.solostecnologia.com.br/profile/27066...\r\n                        if (window.location.href.includes('profile/')) {\r\n                            history.push(window.location.href.split('.profile/')[1]);\r\n                        }\r\n                        else {\r\n                            history.push('/profile');\r\n                        }\r\n                        return [3 /*break*/, 5];\r\n                    case 3:\r\n                        err_1 = _a.sent();\r\n                        if (err_1.response.data.message) {\r\n                            setErrorMessage(err_1.response.data.message);\r\n                        }\r\n                        else if (err_1.response.data.detail) {\r\n                            setErrorMessage(err_1.response.data.detail);\r\n                        }\r\n                        setSignInError(true);\r\n                        return [3 /*break*/, 5];\r\n                    case 4:\r\n                        setLoading(false);\r\n                        return [7 /*endfinally*/];\r\n                    case 5: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); }\r\n    });\r\n    useEffect(function () {\r\n        if (login) {\r\n            history.push('/profile');\r\n        }\r\n    }, [login]);\r\n    return (_jsx(\"div\", __assign({ className: styles.body }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, onChange: function () { signInError && setSignInError(false); }, className: \"login-form\" }, { children: [_jsx(\"div\", __assign({ className: styles.logo }, { children: _jsx(\"img\", { className: styles.logoImg, src: LogoImg, alt: 'logoImage' }, void 0) }), void 0), _jsxs(\"div\", __assign({ className: styles.inputText }, { children: [_jsx(\"input\", { name: 'login', disabled: loading, value: formik.values.login, onChange: formik.handleChange, type: \"text\", placeholder: \"Login\" }, void 0), _jsx(\"p\", __assign({ className: styles.errorMessage }, { children: formik.errors.login && formik.touched.login && _jsx(\"i\", { children: formik.errors.login }, void 0) }), void 0)] }), void 0), _jsxs(\"div\", __assign({ className: styles.inputText }, { children: [_jsx(\"input\", { name: 'password', disabled: loading, value: formik.values.password, onChange: formik.handleChange, type: \"password\", placeholder: \"Senha\" }, void 0), _jsxs(\"p\", __assign({ className: styles.errorMessage }, { children: [\" \", formik.errors.password && formik.touched.password && _jsx(\"i\", { children: formik.errors.password }, void 0)] }), void 0)] }), void 0), signInError &&\r\n                    _jsx(\"div\", __assign({ className: styles.error }, { children: _jsxs(Alert, { children: [_jsx(\"strong\", { children: \"Erro! \" }, void 0), errMessage] }, void 0) }), void 0), _jsxs(Link, __assign({ className: styles.message, to: '/register' }, { children: [\" Esqueceu a senha?\", _jsx(\"span\", { children: \" Solicitar acesso\" }, void 0), \" \"] }), void 0), _jsx(\"button\", __assign({ disabled: loading, className: (loading ? styles.loading : '') + \" \", type: 'submit' }, { children: !loading ? 'Entrar' : _jsx(ClipLoader, { css: override, loading: loading, size: 16 }, void 0) }), void 0)] }), void 0) }), void 0));\r\n};\r\nexport default Login;\r\nvar templateObject_1;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx } from \"react/jsx-runtime\";\r\nimport React, { createContext, useState } from \"react\";\r\nexport var TitleContext = createContext({});\r\nexport function TitleContextProvider(props) {\r\n    var _a = useState(), title = _a[0], setTitle = _a[1];\r\n    return (_jsx(TitleContext.Provider, __assign({ value: { title: title, setTitle: setTitle } }, { children: props.children }), void 0));\r\n}\r\n","import { useContext } from 'react';\r\nimport { TitleContext } from '../context/titleContext';\r\nvar useTitle = function () {\r\n    var value = useContext(TitleContext);\r\n    return value;\r\n};\r\nexport default useTitle;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useFormik } from \"formik\";\r\nimport { useState, useEffect } from \"react\";\r\nimport useAuth from \"../../hooks/useAuth\";\r\nimport useTitle from \"../../hooks/useTitle\";\r\nimport api from \"../../services/api\";\r\nimport { Button, InputDate, InputSelect, InputText } from 'template/lib';\r\nimport styles from './styles.module.scss';\r\nvar Filter = function (props) {\r\n    var title = useTitle().title;\r\n    var login = useAuth().login;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    var _a = useState(''), companyId = _a[0], setCompanyId = _a[1];\r\n    var _b = useState(''), softwareId = _b[0], setSoftwareId = _b[1];\r\n    var _c = useState(), applicationFilter = _c[0], setApplicationFilter = _c[1];\r\n    var _d = useState(), createdByIdFilter = _d[0], setCreatedByIdFilter = _d[1];\r\n    var _e = useState(), requestUserIdFilter = _e[0], setRequestUserIdFilter = _e[1];\r\n    useEffect(function () {\r\n        if (createdByIdFilter) {\r\n            formik.setFieldValue(createdByIdFilter.fieldName, '');\r\n        }\r\n        if (requestUserIdFilter) {\r\n            formik.setFieldValue(requestUserIdFilter.fieldName, '');\r\n        }\r\n        if (companyId) {\r\n            api.get(\"supports/helpFiltersByCompany?companyId=\" + companyId, config).then(function (response) {\r\n                response.data.forEach(function (filter) {\r\n                    switch (filter.fieldName) {\r\n                        case 'CreatedById':\r\n                            setCreatedByIdFilter(null);\r\n                            setCreatedByIdFilter(filter);\r\n                            break;\r\n                        case 'RequestUserId':\r\n                            setRequestUserIdFilter(null);\r\n                            setRequestUserIdFilter(filter);\r\n                            break;\r\n                        default:\r\n                            break;\r\n                    }\r\n                });\r\n            });\r\n        }\r\n        else {\r\n            setCreatedByIdFilter(null);\r\n            setRequestUserIdFilter(null);\r\n        }\r\n    }, [companyId]);\r\n    useEffect(function () {\r\n        if (applicationFilter) {\r\n            formik.setFieldValue(applicationFilter.fieldName, '');\r\n        }\r\n        if (softwareId) {\r\n            api.get(\"helps/applicationFilter/\" + softwareId, config).then(function (response) {\r\n                setApplicationFilter(null);\r\n                setApplicationFilter(response.data);\r\n            });\r\n        }\r\n        else {\r\n            setApplicationFilter(null);\r\n        }\r\n    }, [softwareId]);\r\n    var formik = useFormik({\r\n        initialValues: {},\r\n        enableReinitialize: true,\r\n        onSubmit: function (values) { return __awaiter(void 0, void 0, void 0, function () {\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0: return [4 /*yield*/, props.stateOfFilter(__assign({}, values))];\r\n                    case 1:\r\n                        _a.sent();\r\n                        props.page();\r\n                        return [2 /*return*/];\r\n                }\r\n            });\r\n        }); }\r\n    });\r\n    var applications;\r\n    var requestUsers;\r\n    var createdByUsers;\r\n    if (applicationFilter) {\r\n        applications = {\r\n            label: applicationFilter.fieldDisplay,\r\n            options: applicationFilter.options\r\n        };\r\n    }\r\n    if (requestUserIdFilter) {\r\n        requestUsers = {\r\n            label: requestUserIdFilter.fieldDisplay,\r\n            options: requestUserIdFilter.options\r\n        };\r\n    }\r\n    if (createdByIdFilter) {\r\n        createdByUsers = {\r\n            label: createdByIdFilter.fieldDisplay,\r\n            options: createdByIdFilter.options\r\n        };\r\n    }\r\n    var renderFilter = function (filter) {\r\n        switch (filter.dataType) {\r\n            case 'Text':\r\n                return (_jsx(\"div\", { children: _jsx(InputText, { onChange: formik.handleChange, name: filter.fieldName, label: filter.fieldDisplay }, void 0) }, filter.fieldName));\r\n            case 'Date':\r\n                return (_jsx(\"div\", { children: _jsx(InputDate, { onChange: formik.handleChange, name: filter.fieldName, label: filter.fieldDisplay }, void 0) }, filter.fieldName));\r\n            case 'Select':\r\n                var items = {\r\n                    label: filter.fieldDisplay,\r\n                    options: filter.options\r\n                };\r\n                return (_jsxs(_Fragment, { children: [filter.customFilter == false &&\r\n                            _jsx(_Fragment, { children: _jsx(\"div\", { children: _jsx(InputSelect, { values: items, name: filter.fieldName, onChange: formik.handleChange, valueMember: 'id', displayMember: 'display' }, void 0) }, filter.fieldName) }, void 0), filter.customFilter && filter.fieldName == 'SoftwareId' &&\r\n                            _jsxs(_Fragment, { children: [_jsx(\"div\", { children: _jsx(InputSelect, { values: items, name: filter.fieldName, onChange: function (e) { formik.handleChange(e); setSoftwareId(e.target.value); }, valueMember: 'id', displayMember: 'display' }, void 0) }, filter.fieldName), applicationFilter &&\r\n                                        _jsx(\"div\", { children: _jsx(InputSelect, { values: applications, name: applicationFilter.fieldName, onChange: formik.handleChange, valueMember: 'id', displayMember: 'display' }, void 0) }, applicationFilter.fieldName)] }, void 0), filter.customFilter && filter.fieldName == 'CompanyId' &&\r\n                            _jsxs(_Fragment, { children: [_jsx(\"div\", { children: _jsx(InputSelect, { values: items, name: filter.fieldName, onChange: function (e) { formik.handleChange(e); setCompanyId(e.target.value); }, valueMember: 'id', displayMember: 'display' }, void 0) }, filter.fieldName), requestUserIdFilter &&\r\n                                        _jsx(\"div\", { children: _jsx(InputSelect, { values: requestUsers, name: requestUserIdFilter.fieldName, onChange: formik.handleChange, valueMember: 'id', displayMember: 'display' }, void 0) }, requestUserIdFilter.fieldName), createdByIdFilter &&\r\n                                        _jsx(\"div\", { children: _jsx(InputSelect, { values: createdByUsers, name: createdByIdFilter.fieldName, onChange: formik.handleChange, valueMember: 'id', displayMember: 'display' }, void 0) }, createdByIdFilter.fieldName)] }, void 0)] }, void 0));\r\n            default:\r\n                return null;\r\n        }\r\n    };\r\n    return (_jsx(\"form\", __assign({ onSubmit: formik.handleSubmit }, { children: _jsx(\"div\", __assign({ className: styles.grid }, { children: _jsxs(\"div\", __assign({ className: \"grid grid-cols-1 md:grid-cols-\" + 1 + \" lg:grid-cols-\" + 1 + \" my-2 justify-items-end\" }, { children: [props.data.map(function (filter) { return renderFilter(filter); }), ((login === null || login === void 0 ? void 0 : login.role) === 'Customer' || (login === null || login === void 0 ? void 0 : login.role) === 'CustomerAdmin') &&\r\n                        _jsxs(\"div\", __assign({ className: styles.checkBox }, { children: [_jsx(\"div\", { className: '' }, void 0), _jsx(\"label\", { children: \"Mostrar fechados\" }, void 0), _jsx(\"input\", { name: 'showClosed', onChange: function (e) { formik.handleChange(e); formik.setFieldValue('showClosed', e.target.checked); }, type: 'checkbox' }, void 0)] }), 'showClosed'), _jsxs(\"div\", __assign({ className: styles.button }, { children: [props.closer && _jsx(Button, __assign({ onClick: props.closer, type: 'button' }, { children: \"Cancelar\" }), void 0), _jsx(Button, __assign({ type: 'submit' }, { children: \"Pesquisar\" }), void 0)] }), void 0)] }), void 0) }), void 0) }), void 0));\r\n};\r\nexport default Filter;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useEffect, useState } from 'react';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { BsSearch } from 'react-icons/bs';\r\nimport { GrFilter } from 'react-icons/gr';\r\nimport { FiPlus } from 'react-icons/fi';\r\nimport api from '../../services/api';\r\nimport Filter from '../../components/Filter';\r\nimport useAuth from '../../hooks/useAuth';\r\nimport useTitle from '../../hooks/useTitle';\r\nimport { Table } from 'template/lib';\r\nimport styles from './styles.module.scss';\r\nvar Profile = function () {\r\n    var history = useHistory();\r\n    // button function for navigate to detail page\r\n    var lineBtnsWithoutAssginTo = [\r\n        {\r\n            name: 'Detalhes',\r\n            icon: _jsx(BsSearch, {}, void 0),\r\n            fn: function (id) {\r\n                history.push(\"/profile/\" + id);\r\n            }\r\n        }\r\n    ];\r\n    // buttons for table menu\r\n    var menuButtons = [\r\n        {\r\n            id: 3,\r\n            icon: _jsx(GrFilter, {}, void 0),\r\n            title: 'Filtrar',\r\n            fn: function () {\r\n                if (filter === false) {\r\n                    setFilter(true);\r\n                }\r\n                else {\r\n                    setFilter(false);\r\n                }\r\n            }\r\n        },\r\n        {\r\n            id: 2,\r\n            icon: _jsx(FiPlus, {}, void 0),\r\n            title: 'Novo Suporte',\r\n            fn: function () {\r\n                history.push('/create');\r\n            }\r\n        }\r\n    ];\r\n    var _a = useState([]), helps = _a[0], setHelps = _a[1];\r\n    var _b = useState(1), page = _b[0], setPage = _b[1];\r\n    var _c = useState(15), pageSize = _c[0], setPageSize = _c[1];\r\n    var _d = useState(false), hasNext = _d[0], setHasNext = _d[1];\r\n    var _e = useState(false), filter = _e[0], setFilter = _e[1];\r\n    var _f = useState(0), totalPages = _f[0], setTotalPages = _f[1];\r\n    var _g = useState([]), filterVal = _g[0], setFilterVal = _g[1];\r\n    var _h = useState(), filterState = _h[0], setFilterState = _h[1];\r\n    var _j = useState(true), loading = _j[0], setLoading = _j[1];\r\n    var _k = useAuth(), login = _k.login, handleLogout = _k.handleLogout;\r\n    var setTitle = useTitle().setTitle;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        setTitle('Início');\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        api.get('/helps/helpFilters', config).then(function (response) {\r\n            try {\r\n                setFilterVal(response.data);\r\n            }\r\n            catch (e) {\r\n                handleLogout();\r\n            }\r\n        });\r\n        //creating the filter route \r\n        var urlTotalPages = \"/helps/pendingHelpsTotalPages?pagesize=\" + pageSize;\r\n        var urlPendingHelps = \"/helps/pendingHelps?page=\" + page + \"&pagesize=\" + pageSize;\r\n        if (filterState) {\r\n            for (var key in filterState) {\r\n                var value = filterState[key];\r\n                if (value != null && value != undefined && value != '') {\r\n                    urlTotalPages += \"&\" + key + \"=\" + value;\r\n                    urlPendingHelps += \"&\" + key + \"=\" + value;\r\n                }\r\n            }\r\n        }\r\n        api.get(urlTotalPages, config)\r\n            .then(function (response) {\r\n            setTotalPages(response.data);\r\n            try {\r\n                if (response.data > page) {\r\n                    setHasNext(true);\r\n                }\r\n                else {\r\n                    setHasNext(false);\r\n                }\r\n            }\r\n            catch (e) {\r\n                handleLogout();\r\n                history.push('/');\r\n            }\r\n        });\r\n        api.get(urlPendingHelps, config)\r\n            .then(function (response) {\r\n            try {\r\n                setHelps(response.data);\r\n            }\r\n            catch (e) {\r\n                handleLogout();\r\n                history.push('/');\r\n            }\r\n        }).then(function () { return setLoading(false); });\r\n    }, [page, pageSize, filterState]);\r\n    var closeFilter = function () {\r\n        setFilter(false);\r\n    };\r\n    function pages() {\r\n        setPage(1);\r\n    }\r\n    return (_jsxs(\"div\", __assign({ className: styles.container }, { children: [filter &&\r\n                _jsx(\"div\", __assign({ className: 'm-4' }, { children: _jsx(Filter, { page: pages, closer: closeFilter, data: filterVal, stateOfFilter: setFilterState }, void 0) }), void 0), _jsx(\"div\", __assign({ className: \"\" + (!filter && styles.content) }, { children: _jsx(Table, { setSize: setPageSize, size: pageSize, hasNext: hasNext, page: page, setPage: setPage, data: helps, totalPAges: totalPages, headerButtons: menuButtons, lineButton: lineBtnsWithoutAssginTo, loading: loading, title: 'Chamados', columns: [\r\n                        { label: 'ID', key: 'id' },\r\n                        { label: 'Aplicação', key: 'applicationName' },\r\n                        { label: 'Descrição', key: 'especification', maxLenghtToShowSeeMore: 150 },\r\n                        { label: 'Status', key: 'statusName' },\r\n                        { label: 'Usuário', key: 'requestUserName' },\r\n                    ] }, void 0) }), void 0)] }), void 0));\r\n};\r\nexport default Profile;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useState } from 'react';\r\nimport { AiOutlineClose } from 'react-icons/ai';\r\nimport Modal from 'react-modal';\r\nimport useAuth from '../../../hooks/useAuth';\r\nimport api from '../../../services/api';\r\nimport { Button, Uploader } from 'template/lib';\r\nimport styles from './styles.module.scss';\r\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\r\nModal.setAppElement('#root');\r\nvar ModalAddImages = function (props) {\r\n    var _a = useState([]), photos = _a[0], setPhotos = _a[1];\r\n    var login = useAuth().login;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    var handleSendImages = function (e) {\r\n        e.preventDefault();\r\n        var addImg = function () { return __awaiter(void 0, void 0, void 0, function () {\r\n            var data;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        data = new FormData();\r\n                        return [4 /*yield*/, photos.uploadedFiles[0].map(function (file) {\r\n                                if (!file.error) {\r\n                                    return data.append('images', file.file);\r\n                                }\r\n                                else {\r\n                                    console.log(file.error);\r\n                                }\r\n                            })];\r\n                    case 1:\r\n                        _a.sent();\r\n                        return [4 /*yield*/, api.post(\"helps/\" + props.helpId + \"/images\", data, {\r\n                                headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) },\r\n                            })];\r\n                    case 2:\r\n                        _a.sent();\r\n                        return [2 /*return*/];\r\n                }\r\n            });\r\n        }); };\r\n        addImg().then(function () { return closeModal(); });\r\n    };\r\n    var closeModal = function () {\r\n        setPhotos([]);\r\n        props.setRefresh(true);\r\n        props.handlecloseModalAddImages();\r\n    };\r\n    return (_jsx(\"div\", { children: _jsx(Modal, __assign({ isOpen: props.modalIsOpenAddImages, shouldCloseOnOverlayClick: false, onRequestClose: props.handlecloseModalAddImages, overlayClassName: 'react-modal-overly', className: 'react-modal-content', contentLabel: \"Example Modal\" }, { children: _jsxs(\"div\", { children: [_jsxs(\"div\", __assign({ className: styles.header }, { children: [_jsx(\"div\", {}, void 0), _jsx(\"h2\", { children: \"Adicionar Imagem\" }, void 0), _jsx(AiOutlineClose, { title: 'Fechar', onClick: closeModal }, void 0)] }), void 0), _jsx(\"div\", __assign({ className: styles.content }, { children: _jsxs(\"form\", __assign({ onSubmit: handleSendImages }, { children: [_jsx(Uploader, { stateOfFilesTochange: setPhotos, file: photos.uploadedFiles }, void 0), photos.uploadedFiles &&\r\n                                    _jsx(\"div\", { children: _jsx(Button, __assign({ type: 'submit' }, { children: \"Adicionar\" }), void 0) }, void 0)] }), void 0) }), void 0)] }, void 0) }), void 0) }, void 0));\r\n};\r\nexport default ModalAddImages;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\r\nimport { useEffect } from 'react';\r\nimport api from '../../services/api';\r\nimport apiUrl from '../../services/apiUrl';\r\nimport { useState } from 'react';\r\nimport { useHistory, useParams } from 'react-router-dom';\r\nimport { useFormik } from 'formik';\r\nimport * as Yup from 'yup';\r\nimport useAuth from '../../hooks/useAuth';\r\nimport useTitle from '../../hooks/useTitle';\r\nimport { FiPaperclip, FiPlus } from 'react-icons/fi';\r\nimport { BsLink45Deg } from 'react-icons/bs';\r\nimport ModalAddImages from './../Modals/ModalAddImages';\r\nimport { AiOutlineFile } from 'react-icons/ai';\r\nimport { InputSelect, InputText, InputTextBox, Button, Table } from 'template/lib';\r\nimport styles from './styles.module.scss';\r\nvar commentSchema = Yup.object().shape({\r\n    comment: Yup.string()\r\n        .min(3, 'Por favor, informe pelo menos 3 caracteres.')\r\n        .required('Por favor, informe um comentário.'),\r\n});\r\nvar closedStatus = 2; // Status Fechado = 2\r\nvar Detail = function () {\r\n    var _a = useAuth(), login = _a.login, handleLogout = _a.handleLogout;\r\n    var setTitle = useTitle().setTitle;\r\n    var history = useHistory();\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    var _b = useState(1), page = _b[0], setPage = _b[1];\r\n    var _c = useState(5), pageSize = _c[0], setPageSize = _c[1];\r\n    var _d = useState(false), hasNext = _d[0], setHasNext = _d[1];\r\n    var _e = useState([]), historic = _e[0], setHistoric = _e[1];\r\n    var _f = useState(0), totalPages = _f[0], setTotalPages = _f[1];\r\n    var _g = useState(true), loading = _g[0], setLoading = _g[1];\r\n    var _h = useState(), helps = _h[0], setHelps = _h[1];\r\n    var _j = useState([]), statusToSelct = _j[0], setStatusToSelct = _j[1];\r\n    var _k = useState([]), typesToSelect = _k[0], setTypesToSelect = _k[1];\r\n    var _l = useState([]), requestUserToSelect = _l[0], setRequestUserToSelect = _l[1];\r\n    var _m = useState([]), softawaresToSelct = _m[0], setSoftwaressToSelct = _m[1];\r\n    var _o = useState([]), applicationToSelect = _o[0], setApplicationToSelect = _o[1];\r\n    var _p = useState([]), assignedToSelect = _p[0], setAssignedToSelect = _p[1];\r\n    var _q = useState(''), softwareId = _q[0], setSoftwareId = _q[1];\r\n    var _r = useState(false), refresh = _r[0], setRefresh = _r[1];\r\n    var _s = useState([]), prioritiesSelect = _s[0], setPrioritiesSelect = _s[1];\r\n    var _t = useState(false), statusWasClosed = _t[0], setStatusWasClosed = _t[1];\r\n    var _u = useState(false), statusClosing = _u[0], setStatusClosing = _u[1];\r\n    var helpSchema = Yup.object().shape({\r\n        TfsWorkItem: Yup.number()\r\n            .nullable()\r\n            .typeError('Por favor, informe um valor numérico para o TFS Work Item.')\r\n            .min(1, 'Por favor, informe um valor maior que 0 para o TFS Work Item.'),\r\n        resolution: Yup.string()\r\n            .when([], {\r\n            is: function () { return statusClosing; },\r\n            then: Yup.string().nullable().required('Por favor, informe uma resolução.'),\r\n            otherwise: Yup.string().nullable(),\r\n        }),\r\n    });\r\n    var _v = useState([]), img = _v[0], setImg = _v[1];\r\n    var _w = useState(false), saveBtn = _w[0], setSaveBtn = _w[1];\r\n    var _x = useState(false), modalIsOpenAddImages = _x[0], setIsOpenAddImages = _x[1];\r\n    var _y = useState(false), isSubmittingComment = _y[0], setIsSubmittingComment = _y[1];\r\n    var params = useParams();\r\n    var id = params.id;\r\n    useEffect(function () {\r\n        if (window.location.pathname.includes('NewPage')) {\r\n            var sideBarSize = document.getElementById('sideBarSizeId');\r\n            sideBarSize === null || sideBarSize === void 0 ? void 0 : sideBarSize.classList.remove('sideBarSize');\r\n            sideBarSize === null || sideBarSize === void 0 ? void 0 : sideBarSize.classList.add(\"sideBarSizeProfileNewPage\");\r\n            var layoutChildren = document.getElementById('layoutChildrenId');\r\n            layoutChildren === null || layoutChildren === void 0 ? void 0 : layoutChildren.classList.remove('layoutChildren');\r\n            layoutChildren === null || layoutChildren === void 0 ? void 0 : layoutChildren.classList.add(\"layoutChildrenProfileNewPage\");\r\n        }\r\n        setTitle('Detalhes');\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        api.get(\"helps/\" + id, config)\r\n            .then(function (response) {\r\n            setRefresh(false);\r\n            setHelps(response.data);\r\n            setStatusToSelct(response.data.select_status.select);\r\n            setTypesToSelect(response.data.select_types.select);\r\n            setRequestUserToSelect(response.data.select_requestUsers.select);\r\n            setSoftwaressToSelct(response.data.select_softwares.select);\r\n            setApplicationToSelect(response.data.select_applications.select);\r\n            setAssignedToSelect(response.data.select_assignedTo.select);\r\n            setPrioritiesSelect(response.data.select_priorities.select);\r\n            setStatusWasClosed(response.data.select_status.id == closedStatus);\r\n        }).catch(function () { return history.push('/'); });\r\n    }, [refresh]);\r\n    useEffect(function () {\r\n        if (refresh === true) {\r\n            setRefresh(false);\r\n        }\r\n        if (softwareId) {\r\n            api.get(\"helps/\" + id, config)\r\n                .then(function (response) {\r\n                api.get(\"/helps/softwares/\" + softwareId + \"/applications\", config).then(function (response) {\r\n                    setApplicationToSelect(response.data);\r\n                });\r\n            });\r\n        }\r\n        api.get(\"helps/\" + id + \"/images\", config).then(function (response) {\r\n            setImg(response.data);\r\n        });\r\n    }, [softwareId, refresh]);\r\n    useEffect(function () {\r\n        if (refresh === true) {\r\n            setRefresh(false);\r\n        }\r\n        api.get(\"helps/\" + id + \"/commentsTotalPages?pagesize=\" + pageSize, config)\r\n            .then(function (response) {\r\n            setTotalPages(response.data);\r\n            if (response.data > page) {\r\n                setHasNext(true);\r\n            }\r\n            else {\r\n                setHasNext(false);\r\n            }\r\n        });\r\n        api.get(\"helps/\" + id + \"/comments?page=\" + page + \"&pagesize=\" + pageSize, config)\r\n            .then(function (response) {\r\n            setHistoric([response.data]);\r\n        }).then(function () { return setLoading(false); });\r\n    }, [page, pageSize, refresh]);\r\n    var firstForm = useFormik({\r\n        initialValues: {\r\n            id: helps === null || helps === void 0 ? void 0 : helps.id,\r\n            cretedByName: helps === null || helps === void 0 ? void 0 : helps.cretedByName,\r\n            companyName: helps === null || helps === void 0 ? void 0 : helps.companyName,\r\n            TfsWorkItem: helps === null || helps === void 0 ? void 0 : helps.tfsWorkItem,\r\n            especification: helps === null || helps === void 0 ? void 0 : helps.especification,\r\n            creationDate: helps === null || helps === void 0 ? void 0 : helps.dataCriacaoComHora,\r\n            requestUserId: helps === null || helps === void 0 ? void 0 : helps.select_requestUsers.id,\r\n            applicationid: helps === null || helps === void 0 ? void 0 : helps.select_applications.id,\r\n            AssignedToId: helps === null || helps === void 0 ? void 0 : helps.select_assignedTo.id,\r\n            typeid: helps === null || helps === void 0 ? void 0 : helps.select_types.id,\r\n            statusid: helps === null || helps === void 0 ? void 0 : helps.select_status.id,\r\n            closedBy: helps === null || helps === void 0 ? void 0 : helps.closedByName,\r\n            closedDate: helps === null || helps === void 0 ? void 0 : helps.closedDate,\r\n            requestUserContact: helps === null || helps === void 0 ? void 0 : helps.requestUserContact,\r\n            anyDeskAddress: helps === null || helps === void 0 ? void 0 : helps.anyDeskAddress,\r\n            priority: helps === null || helps === void 0 ? void 0 : helps.select_priorities.id,\r\n            resolution: helps === null || helps === void 0 ? void 0 : helps.resolution,\r\n        },\r\n        validationSchema: helpSchema,\r\n        enableReinitialize: true,\r\n        onSubmit: function (values, actions) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var payload;\r\n            return __generator(this, function (_a) {\r\n                payload = __assign(__assign({}, values), { TfsWorkItem: values.TfsWorkItem === '' ? null : values.TfsWorkItem });\r\n                api.put(\"supports/\" + id + \"/update\", payload, config).then(function (response) {\r\n                }).then(function () { return setSaveBtn(false); }).then(function () { return setRefresh(true); });\r\n                return [2 /*return*/];\r\n            });\r\n        }); },\r\n    });\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            comment: ''\r\n        },\r\n        validationSchema: commentSchema,\r\n        onSubmit: function (values, actions) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var newComment, err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        if (isSubmittingComment)\r\n                            return [2 /*return*/];\r\n                        _a.label = 1;\r\n                    case 1:\r\n                        _a.trys.push([1, 3, 4, 5]);\r\n                        setIsSubmittingComment(true);\r\n                        newComment = {\r\n                            comment: formik.values.comment\r\n                        };\r\n                        return [4 /*yield*/, api.post(\"helps/\" + id + \"/comments\", newComment, config)];\r\n                    case 2:\r\n                        _a.sent();\r\n                        actions.resetForm({\r\n                            values: {\r\n                                comment: ''\r\n                            },\r\n                        });\r\n                        api.get(\"helps/\" + id + \"/comments?page=\" + page + \"&pagesize=\" + pageSize, config)\r\n                            .then(function (response) {\r\n                            setHistoric([response.data]);\r\n                        }).then(function () { return setRefresh(true); });\r\n                        return [3 /*break*/, 5];\r\n                    case 3:\r\n                        err_1 = _a.sent();\r\n                        alert('erro');\r\n                        return [3 /*break*/, 5];\r\n                    case 4:\r\n                        setIsSubmittingComment(false);\r\n                        return [7 /*endfinally*/];\r\n                    case 5: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); },\r\n    });\r\n    //window.open(`${'http://179.124.195.36:18481/api/'}helps/${id}/images/${imgId}`, '_blank');\r\n    var openImg = function (imgId) {\r\n        window.open(apiUrl + \"helps/\" + id + \"/images/\" + imgId, '_blank');\r\n    };\r\n    var openLink = function (item) {\r\n        var url;\r\n        url = 'http://wps-2:8080/tfs/Wps/WpsCollection/_workitems#id=';\r\n        url += item;\r\n        url += '&_a=edit&fullScreen=true';\r\n        window.open(url, '_blank');\r\n    };\r\n    var statusSelects = {\r\n        label: 'Status',\r\n        options: statusToSelct\r\n    };\r\n    var typesSelects = {\r\n        label: 'Tipo',\r\n        options: typesToSelect\r\n    };\r\n    var requestUser = {\r\n        label: 'Requerente',\r\n        options: requestUserToSelect\r\n    };\r\n    var selectSoftwares = {\r\n        label: 'Software',\r\n        options: softawaresToSelct\r\n    };\r\n    var selectApplications = {\r\n        label: 'Aplicação',\r\n        options: applicationToSelect\r\n    };\r\n    var selectassignes = {\r\n        label: 'Assinado para',\r\n        options: assignedToSelect\r\n    };\r\n    var selectPriorities = {\r\n        label: 'Prioridade',\r\n        options: prioritiesSelect\r\n    };\r\n    function handleOpenModalAddImages() {\r\n        setIsOpenAddImages(true);\r\n    }\r\n    function handlecloseModalAddImages() {\r\n        setIsOpenAddImages(false);\r\n    }\r\n    function goBackOrCloseTab() {\r\n        if (window.location.pathname.includes('NewPage')) {\r\n            window.opener = null;\r\n            window.open(\"\", \"_self\");\r\n            window.close();\r\n        }\r\n        else {\r\n            if (window.history.state == null) {\r\n                history.push('/');\r\n            }\r\n            else {\r\n                history.goBack();\r\n            }\r\n        }\r\n    }\r\n    ;\r\n    return (_jsxs(\"div\", __assign({ className: styles.container }, { children: [_jsxs(\"form\", __assign({ onSubmit: firstForm.handleSubmit, onChange: function () { return setSaveBtn(true); } }, { children: [_jsxs(\"div\", __assign({ className: styles.grid }, { children: [_jsxs(\"div\", __assign({ className: styles.inputAreaGrid }, { children: [_jsx(InputText, { disabled: true, onChange: firstForm.handleChange, name: 'Id', label: 'ID', inicialValue: firstForm.values.id || '' }, void 0), _jsx(InputText, { disabled: true, onChange: firstForm.handleChange, name: 'companyName', label: 'Empresa', inicialValue: firstForm.values.companyName || '' }, void 0), _jsx(InputSelect, { value: softwareId, name: 'softwareId', disabled: ((login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator' ? false : true) || (helps === null || helps === void 0 ? void 0 : helps.select_status.id) === 2, onChange: function (e) { return setSoftwareId(e.target.value); }, values: selectSoftwares, valueMember: 'id', displayMember: 'name', firstOption: (helps === null || helps === void 0 ? void 0 : helps.select_softwares.name) || '' }, void 0), _jsx(InputText, { disabled: true, onChange: firstForm.handleChange, name: 'creationDate', label: 'Data/Hora', inicialValue: firstForm.values.creationDate || '' }, void 0), _jsx(InputText, { disabled: true, onChange: firstForm.handleChange, name: 'cretedByName', label: 'Criado por', inicialValue: firstForm.values.cretedByName || '' }, void 0), _jsx(InputSelect, { value: firstForm.values.applicationid, name: 'applicationid', disabled: ((login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator' ? false : true) || (helps === null || helps === void 0 ? void 0 : helps.select_status.id) === 2, onChange: firstForm.handleChange, values: selectApplications, valueMember: 'id', displayMember: 'name', notNull: true }, void 0), _jsx(InputSelect, { value: firstForm.values.typeid, name: 'typeid', disabled: ((login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator' ? false : true) || (helps === null || helps === void 0 ? void 0 : helps.select_status.id) === 2, onChange: firstForm.handleChange, values: typesSelects, valueMember: 'id', displayMember: 'name', notNull: true }, void 0), _jsx(InputSelect, { value: firstForm.values.requestUserId, name: 'requestUserId', disabled: ((login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator' ? false : true) || (helps === null || helps === void 0 ? void 0 : helps.select_status.id) === 2, onChange: firstForm.handleChange, values: requestUser, valueMember: 'id', displayMember: 'name', notNull: true }, void 0), _jsx(InputText, { disabled: (login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator' ? false : true, onChange: firstForm.handleChange, name: 'TfsWorkItem', label: 'TFS Work Item', inicialValue: firstForm.values.TfsWorkItem }, void 0), _jsx(InputSelect, { value: firstForm.values.AssignedToId, name: 'AssignedToId', disabled: ((login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator' ? false : true) || (helps === null || helps === void 0 ? void 0 : helps.select_status.id) === 2, onChange: firstForm.handleChange, values: selectassignes, valueMember: 'id', displayMember: 'name' }, void 0), _jsx(InputText, { disabled: true, name: 'RequestUserContact', label: 'Contato', inicialValue: firstForm.values.requestUserContact }, void 0), (helps === null || helps === void 0 ? void 0 : helps.tfsWorkItem) && ((login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator') && _jsxs(\"div\", __assign({ className: styles.openTfs }, { children: [\" \", _jsx(BsLink45Deg, { className: ' ml-4 text-lg' }, void 0), \"  \", _jsx(\"span\", __assign({ onClick: function () { return openLink(helps === null || helps === void 0 ? void 0 : helps.tfsWorkItem); } }, { children: \"Abrir no TFS\" }), void 0)] }), void 0), ((helps === null || helps === void 0 ? void 0 : helps.tfsWorkItem) == undefined) && _jsx(\"span\", {}, void 0), _jsx(InputSelect, { value: firstForm.values.statusid, name: 'statusid', disabled: ((login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator' ? false : true) || (helps === null || helps === void 0 ? void 0 : helps.select_status.id) === 2, onChange: function (e) { firstForm.handleChange(e); setStatusClosing(e.target.value == closedStatus); }, values: statusSelects, valueMember: 'id', displayMember: 'name', notNull: true }, void 0), ((helps === null || helps === void 0 ? void 0 : helps.closedDate) != null) &&\r\n                                        _jsxs(_Fragment, { children: [_jsx(InputText, { disabled: (helps === null || helps === void 0 ? void 0 : helps.select_status.id) === 2, onChange: firstForm.handleChange, name: 'closedBy', label: 'Fechado por', inicialValue: firstForm.values.closedBy }, void 0), _jsx(InputText, { disabled: (helps === null || helps === void 0 ? void 0 : helps.select_status.id) === 2, onChange: firstForm.handleChange, name: 'closedDate', label: 'Data Conclus\\u00E3o', inicialValue: firstForm.values.closedDate }, void 0)] }, void 0), _jsx(InputText, { name: 'anyDeskAddress', label: 'End. AnyDesk', onChange: firstForm.handleChange, inicialValue: firstForm.values.anyDeskAddress, disabled: ((login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator' ? false : true) || (helps === null || helps === void 0 ? void 0 : helps.select_status.id) === 2, maxLength: 20 }, void 0), _jsx(InputSelect, { value: firstForm.values.priority, name: 'priority', disabled: ((login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator' ? false : true) || (helps === null || helps === void 0 ? void 0 : helps.select_status.id) === 2, onChange: firstForm.handleChange, values: selectPriorities, valueMember: 'id', displayMember: 'name' }, void 0)] }), void 0), firstForm.errors.TfsWorkItem && firstForm.touched.TfsWorkItem &&\r\n                                _jsxs(_Fragment, { children: [_jsx(\"br\", {}, void 0), _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: firstForm.errors.TfsWorkItem }), void 0)] }, void 0)] }), void 0), _jsx(InputTextBox, { disabled: ((login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator' ? false : true) || (helps === null || helps === void 0 ? void 0 : helps.select_status.id) === 2, width: '65%', height: '3/6', label: 'Descri\\u00E7\\u00E3o', inicialValue: firstForm.values.especification, onChange: firstForm.handleChange, name: 'especification' }, void 0), (statusClosing || statusWasClosed) &&\r\n                        _jsxs(_Fragment, { children: [_jsx(\"div\", __assign({ style: { marginTop: \"-1.5rem\", marginBottom: \"-1rem\" } }, { children: _jsx(InputTextBox, { disabled: ((login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator' ? false : true) || (helps === null || helps === void 0 ? void 0 : helps.resolution) != null, width: '65%', height: '3/6', label: 'Resolu\\u00E7\\u00E3o', inicialValue: firstForm.values.resolution, onChange: firstForm.handleChange, name: 'resolution' }, void 0) }), void 0), firstForm.errors.resolution && firstForm.touched.resolution &&\r\n                                    _jsxs(_Fragment, { children: [_jsx(\"i\", __assign({ className: styles.formikErrors }, { children: firstForm.errors.resolution }), void 0), _jsx(\"br\", {}, void 0)] }, void 0), _jsx(\"br\", {}, void 0)] }, void 0), saveBtn &&\r\n                        _jsx(\"div\", __assign({ className: 'text-left mt-2' }, { children: _jsx(Button, __assign({ type: 'submit' }, { children: \"Salvar\" }), void 0) }), void 0)] }), void 0), saveBtn &&\r\n                _jsx(\"br\", {}, void 0), _jsxs(\"div\", __assign({ className: styles.attachments }, { children: [_jsx(\"span\", __assign({ className: styles.spanText }, { children: \"Anexos\" }), void 0), (helps === null || helps === void 0 ? void 0 : helps.select_status.id) !== 2 && _jsxs(\"span\", __assign({ className: styles.spanSvg, title: 'Adcionar imagens', onClick: handleOpenModalAddImages }, { children: [\" \", _jsx(FiPlus, {}, void 0), _jsx(AiOutlineFile, {}, void 0)] }), void 0)] }), void 0), _jsx(\"div\", __assign({ className: styles.contentAttachments }, { children: img.length < 1 ? _jsx(\"span\", { children: \"Nenhum arquivo at\\u00E9 o momento\" }, void 0) :\r\n                    _jsx(\"div\", __assign({ className: 'grid grid-cols-4 md:grid-cols-5 lg:grid-cols-6 gap-1 cursor-pointer mx-4 my-2' }, { children: img.map(function (item, index) { return (_jsxs(\"div\", __assign({ className: styles.flex }, { children: [\" \", _jsx(FiPaperclip, { className: 'mt-1 ml-4' }, void 0), \"  \", _jsx(\"span\", __assign({ onClick: function () { return openImg(item.id); } }, { children: String(item.name).substr(0, 20) }), void 0)] }), index)); }) }), void 0) }), void 0), _jsx(\"br\", {}, void 0), _jsxs(\"div\", __assign({ className: '' }, { children: [historic.map(function (hist, index) { return (_jsx(Table, { totalPAges: totalPages, setSize: setPageSize, loading: loading, size: pageSize, hasNext: hasNext, page: page, setPage: setPage, data: hist, columns: [\r\n                            { label: 'ID', key: 'id' },\r\n                            { label: 'Usuário', key: 'userName' },\r\n                            { label: 'Data', key: 'dataComHora' },\r\n                            { label: 'Comentário', key: 'comment' }\r\n                        ], title: 'Coment\\u00E1rios' }, index)); }), _jsxs(\"div\", __assign({ className: styles.commentsContainer }, { children: [(helps === null || helps === void 0 ? void 0 : helps.select_status.id) !== 2 ?\r\n                                _jsx(\"form\", __assign({ onSubmit: formik.handleSubmit }, { children: _jsxs(\"div\", __assign({ className: 'flex row' }, { children: [_jsx(InputTextBox, { onChange: formik.handleChange, inicialValue: formik.values.comment, name: 'comment', height: '1/6', width: '30%', label: 'Digite um novo coment\\u00E1rio', maxLength: \"2000\" }, void 0), formik.errors.comment && formik.touched.comment &&\r\n                                                _jsxs(_Fragment, { children: [_jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.comment }), void 0), _jsx(\"br\", {}, void 0), \" \", _jsx(\"br\", {}, void 0)] }, void 0), _jsxs(\"div\", __assign({ className: 'flex items-end m-4 gap-2' }, { children: [isSubmittingComment ?\r\n                                                        _jsx(_Fragment, { children: _jsx(\"span\", __assign({ className: styles.spanFakeButton }, { children: \"Enviando...\" }), void 0) }, void 0)\r\n                                                        :\r\n                                                            _jsx(_Fragment, { children: _jsx(Button, __assign({ type: 'submit' }, { children: \"Enviar\" }), void 0) }, void 0), _jsx(Button, __assign({ onClick: function () { return goBackOrCloseTab(); }, type: 'button' }, { children: \"Voltar\" }), void 0)] }), void 0)] }), void 0) }), void 0) :\r\n                                _jsx(\"div\", __assign({ className: styles.buttonBack }, { children: _jsx(Button, __assign({ onClick: function () { return goBackOrCloseTab(); }, type: 'button' }, { children: \"Voltar\" }), void 0) }), void 0), _jsx(ModalAddImages, { setRefresh: setRefresh, helpId: id, modalIsOpenAddImages: modalIsOpenAddImages, handleOpenModalAddImages: handleOpenModalAddImages, handlecloseModalAddImages: handlecloseModalAddImages }, void 0)] }), void 0)] }), void 0)] }), void 0));\r\n};\r\nexport default Detail;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useFormik } from 'formik';\r\nimport * as Yup from 'yup';\r\nimport api from '../../services/api';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { useEffect, useState } from 'react';\r\nimport useAuth from '../../hooks/useAuth';\r\nimport useTitle from '../../hooks/useTitle';\r\nimport styles from './styles.module.scss';\r\nimport { Uploader, Button, InputSelect, InputTextBox, InputText } from 'template/lib';\r\nvar Create = function () {\r\n    var _a = useState([]), companiesToSelect = _a[0], setCompaniesToSelect = _a[1];\r\n    var _b = useState([]), usersToSelect = _b[0], setUsersToSelect = _b[1];\r\n    var _c = useState([]), software = _c[0], setSoftware = _c[1];\r\n    var _d = useState([]), applications = _d[0], setApplications = _d[1];\r\n    var _e = useState(''), softwareId = _e[0], setSoftwareId = _e[1];\r\n    var _f = useState([]), helpType = _f[0], setHelpType = _f[1];\r\n    var _g = useState([]), photos = _g[0], setPhotos = _g[1];\r\n    var _h = useState(false), hasImg = _h[0], setHasImg = _h[1];\r\n    var _j = useState('0'), companyId = _j[0], setCompanyId = _j[1];\r\n    var _k = useAuth(), login = _k.login, handleLogout = _k.handleLogout;\r\n    var setTitle = useTitle().setTitle;\r\n    var _l = useState(false), isSubmitting = _l[0], setIsSubmitting = _l[1];\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        setTitle('Novo Chamado');\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        api.get('/helps/softwares', config).then(function (response) {\r\n            setSoftware(response.data);\r\n        });\r\n        if (softwareId) {\r\n            api.get(\"/helps/softwares/\" + softwareId + \"/applications\", config).then(function (response) {\r\n                setApplications(response.data);\r\n            });\r\n        }\r\n        if ((login === null || login === void 0 ? void 0 : login.role) === 'Administrator' || (login === null || login === void 0 ? void 0 : login.role) === 'Help') {\r\n            api.get('supports/helpTypes', config).then(function (response) {\r\n                setHelpType(response.data);\r\n            });\r\n            api.get('/companies/active', config).then(function (response) {\r\n                setCompaniesToSelect(response.data);\r\n            });\r\n            if (companyId !== '0') {\r\n                api.get(\"/companies/\" + companyId + \"/userOptions\", config).then(function (response) {\r\n                    setUsersToSelect(response.data);\r\n                });\r\n            }\r\n        }\r\n    }, [softwareId, companyId]);\r\n    var companies = {\r\n        label: 'Empresa',\r\n        options: companiesToSelect\r\n    };\r\n    var type = {\r\n        label: 'Tipo de Chamado',\r\n        options: helpType\r\n    };\r\n    var softweres = {\r\n        label: 'Software',\r\n        options: software\r\n    };\r\n    var aplication = {\r\n        label: 'Aplicação',\r\n        options: applications ? applications : []\r\n    };\r\n    var users = {\r\n        label: 'Usuário',\r\n        options: usersToSelect ? usersToSelect : []\r\n    };\r\n    var columns = 1;\r\n    var history = useHistory();\r\n    var helpSchema = Yup.object().shape({\r\n        applicationId: Yup.string()\r\n            .required('Por favor, informe uma aplicação.'),\r\n        specification: Yup.string()\r\n            .required('Por favor, informe uma descrição.'),\r\n    });\r\n    var helpSchemaAdmin = Yup.object().shape({\r\n        applicationId: Yup.string()\r\n            .required('Por favor, informe uma aplicação.'),\r\n        specification: Yup.string()\r\n            .required('Por favor, informe uma descrição.'),\r\n        requestUserId: Yup.string()\r\n            .required('Por favor, informe um usuário.'),\r\n        TypeId: Yup.string()\r\n            .required('Por favor, informe um tipo.'),\r\n    });\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            company: companyId,\r\n            requestUserId: '',\r\n            softwareID: '',\r\n            applicationId: '',\r\n            specification: '',\r\n            TypeId: '',\r\n            anyDeskAddress: ''\r\n        },\r\n        validationSchema: (login === null || login === void 0 ? void 0 : login.role) === 'Help' || (login === null || login === void 0 ? void 0 : login.role) === 'Administrator' ? helpSchemaAdmin : helpSchema,\r\n        onSubmit: function (values) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var typeId, id_1, err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        typeId = values.TypeId == '' ? 0 : values.TypeId;\r\n                        if (isSubmitting)\r\n                            return [2 /*return*/];\r\n                        _a.label = 1;\r\n                    case 1:\r\n                        _a.trys.push([1, 3, 4, 5]);\r\n                        setIsSubmitting(true);\r\n                        return [4 /*yield*/, api.post('/helps', __assign(__assign({}, values), { company: companyId, softwareID: softwareId, TypeId: typeId }), config).then(function (response) { return id_1 = response.data; }).then(function () {\r\n                                if (hasImg) {\r\n                                    var addImg = function () { return __awaiter(void 0, void 0, void 0, function () {\r\n                                        var data;\r\n                                        return __generator(this, function (_a) {\r\n                                            switch (_a.label) {\r\n                                                case 0:\r\n                                                    data = new FormData();\r\n                                                    return [4 /*yield*/, photos.uploadedFiles[0].map(function (file) {\r\n                                                            if (!file.error) {\r\n                                                                return data.append('images', file.file);\r\n                                                            }\r\n                                                            else {\r\n                                                                console.log(file.error);\r\n                                                            }\r\n                                                        })];\r\n                                                case 1:\r\n                                                    _a.sent();\r\n                                                    return [4 /*yield*/, api.post(\"helps/\" + id_1 + \"/images\", data, {\r\n                                                            headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) },\r\n                                                        }).then(function () { return history.push('profile'); })];\r\n                                                case 2:\r\n                                                    _a.sent();\r\n                                                    return [2 /*return*/];\r\n                                            }\r\n                                        });\r\n                                    }); };\r\n                                    addImg();\r\n                                }\r\n                                else {\r\n                                    history.push('profile');\r\n                                }\r\n                            })];\r\n                    case 2:\r\n                        _a.sent();\r\n                        return [3 /*break*/, 5];\r\n                    case 3:\r\n                        err_1 = _a.sent();\r\n                        if (!login || Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n                            handleLogout();\r\n                            history.push('/');\r\n                        }\r\n                        alert('erro');\r\n                        return [3 /*break*/, 5];\r\n                    case 4:\r\n                        setIsSubmitting(false);\r\n                        return [7 /*endfinally*/];\r\n                    case 5: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); },\r\n    });\r\n    return (\r\n    //<div className='overflow-auto h-screen'>\r\n    _jsx(\"div\", __assign({ className: styles.container }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, className: 'mx-4 my-4' }, { children: [_jsx(\"div\", __assign({ className: styles.grid }, { children: _jsxs(\"div\", __assign({ className: styles.inputs }, { children: [((login === null || login === void 0 ? void 0 : login.role) === 'Administrator' || (login === null || login === void 0 ? void 0 : login.role) === 'Help') &&\r\n                                _jsxs(_Fragment, { children: [_jsx(InputSelect, { name: 'company', value: companyId, values: companies, valueMember: 'id', displayMember: 'name', onChange: function (e) { return setCompanyId(e.target.value); } }, void 0), _jsx(InputSelect, { onChange: formik.handleChange, value: formik.values.requestUserId, name: 'requestUserId', values: users, valueMember: 'id', displayMember: 'name' }, void 0), formik.errors.requestUserId && formik.touched.requestUserId && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.requestUserId }), void 0), _jsx(InputSelect, { onChange: formik.handleChange, value: formik.values.TypeId, name: 'TypeId', values: type, valueMember: 'id', displayMember: 'name' }, void 0), formik.errors.TypeId && formik.touched.TypeId && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.TypeId }), void 0)] }, void 0), _jsx(InputSelect, { onChange: function (e) { return setSoftwareId(e.target.value); }, name: 'softwareID', value: softwareId, values: softweres, valueMember: 'id', displayMember: 'name' }, void 0), _jsx(InputSelect, { onChange: formik.handleChange, value: formik.values.applicationId, name: 'applicationId', values: aplication, valueMember: 'id', displayMember: 'name' }, void 0), formik.errors.applicationId && formik.touched.applicationId && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.applicationId }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'anyDeskAddress', label: 'End. AnyDesk', inicialValue: formik.values.anyDeskAddress, maxLength: 20 }, void 0)] }), void 0) }), void 0), _jsx(\"div\", __assign({ className: 'w-1/5' }, { children: _jsx(\"div\", __assign({ className: 'mt-6' }, { children: _jsx(Uploader, { setHasImg: setHasImg, stateOfFilesTochange: setPhotos, file: photos.uploadedFiles }, void 0) }), void 0) }), void 0), _jsx(InputTextBox, { onChange: formik.handleChange, value: formik.values.specification, width: '64%', name: 'specification', label: 'Descrição' }, void 0), formik.errors.specification && formik.touched.specification && _jsxs(_Fragment, { children: [\" \", _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.specification }), void 0), \" \", _jsx(\"br\", {}, void 0), \" \", _jsx(\"br\", {}, void 0)] }, void 0), _jsxs(\"div\", __assign({ className: styles.buttons }, { children: [isSubmitting ?\r\n                            _jsx(_Fragment, { children: _jsx(\"span\", __assign({ className: styles.spanFakeButton }, { children: \"Enviando...\" }), void 0) }, void 0)\r\n                            :\r\n                                _jsx(_Fragment, { children: _jsx(Button, __assign({ type: 'submit', className: styles.submit }, { children: \"Enviar\" }), void 0) }, void 0), _jsx(Button, __assign({ onClick: function () { return history.goBack(); }, type: 'button' }, { children: \"Voltar\" }), void 0)] }), void 0)] }), void 0) }), void 0)\r\n    //</div>\r\n    );\r\n};\r\nexport default Create;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\r\n    for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n        to[j] = from[i];\r\n    return to;\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { BsPen, BsSearch } from \"react-icons/bs\";\r\nimport { FiPlus } from \"react-icons/fi\";\r\nimport { GrFilter } from \"react-icons/gr\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport Filter from \"../../components/Filter\";\r\nimport useAuth from \"../../hooks/useAuth\";\r\nimport useTitle from \"../../hooks/useTitle\";\r\nimport api from \"../../services/api\";\r\nimport { Table } from 'template/lib';\r\nimport styles from './styles.module.scss';\r\nvar Dashboard = function () {\r\n    var _a = useAuth(), login = _a.login, handleLogout = _a.handleLogout;\r\n    var setTitle = useTitle().setTitle;\r\n    var history = useHistory();\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    //assignedToMe\r\n    var _b = useState([]), helps = _b[0], setHelps = _b[1];\r\n    var _c = useState(1), page = _c[0], setPage = _c[1];\r\n    var _d = useState(15), pageSize = _d[0], setPageSize = _d[1];\r\n    var _e = useState(0), totalPages = _e[0], setTotalPages = _e[1];\r\n    var _f = useState(false), hasNext = _f[0], setHasNext = _f[1];\r\n    var _g = useState(false), filter = _g[0], setFilter = _g[1];\r\n    var _h = useState([]), filterVal = _h[0], setFilterVal = _h[1];\r\n    var _j = useState(), filterState = _j[0], setFilterState = _j[1];\r\n    var _k = useState(true), loading = _k[0], setLoading = _k[1];\r\n    //notAssigned\r\n    var _l = useState([]), helpsNotAssigned = _l[0], setHelpsNotAssigned = _l[1];\r\n    var _m = useState(1), pageNotAssigned = _m[0], setPageNotAssigned = _m[1];\r\n    var _o = useState(5), pageSizeNotAssigned = _o[0], setPageSizeNotAssigned = _o[1];\r\n    var _p = useState(0), totalPagesNotAssigned = _p[0], setTotalPagesNotAssigned = _p[1];\r\n    var _q = useState(false), hasNextNotAssigned = _q[0], setHasNextNotAssigned = _q[1];\r\n    var _r = useState(false), filterNotAssigned = _r[0], setFilterNotAssigned = _r[1];\r\n    var _s = useState([]), filterValNotAssigned = _s[0], setFilterValNotAssigned = _s[1];\r\n    var _t = useState(), filterStateNotAssigned = _t[0], setFilterStateNotAssigned = _t[1];\r\n    var _u = useState(true), loadingNotAssigned = _u[0], setLoadingNotAssigned = _u[1];\r\n    useEffect(function () {\r\n        setTitle('Dashboard');\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        setLoadingNotAssigned(true);\r\n        api.get('/helps/helpFilters', config).then(function (response) {\r\n            try {\r\n                setFilterValNotAssigned(response.data);\r\n            }\r\n            catch (e) {\r\n                handleLogout();\r\n            }\r\n        });\r\n        //creating the filter route \r\n        var urlTotalPagesNotAssigned = \"/supports/pendingHelpsAssignedToTotalPages?pagesize=\" + pageSizeNotAssigned;\r\n        var urlPendingHelpsNotAssigned = \"supports/pendingHelpsAssignedTo?page=\" + pageNotAssigned + \"&pagesize=\" + pageSizeNotAssigned;\r\n        if (filterStateNotAssigned) {\r\n            for (var key in filterStateNotAssigned) {\r\n                var value = filterStateNotAssigned[key];\r\n                if (value != null && value != undefined && value != '') {\r\n                    urlTotalPagesNotAssigned += \"&\" + key + \"=\" + value;\r\n                    urlPendingHelpsNotAssigned += \"&\" + key + \"=\" + value;\r\n                }\r\n            }\r\n        }\r\n        api.get(urlTotalPagesNotAssigned, config)\r\n            .then(function (response) {\r\n            setTotalPagesNotAssigned(response.data);\r\n            try {\r\n                if (response.data > pageNotAssigned) {\r\n                    setHasNextNotAssigned(true);\r\n                }\r\n                else {\r\n                    setHasNextNotAssigned(false);\r\n                }\r\n            }\r\n            catch (e) {\r\n                handleLogout();\r\n                history.push('/');\r\n            }\r\n        });\r\n        api.get(urlPendingHelpsNotAssigned, config)\r\n            .then(function (response) {\r\n            try {\r\n                setHelpsNotAssigned(response.data);\r\n            }\r\n            catch (e) {\r\n                handleLogout();\r\n                history.push('/');\r\n            }\r\n        }).then(function () { return setLoadingNotAssigned(false); });\r\n    }, [pageNotAssigned, pageSizeNotAssigned, filterStateNotAssigned]);\r\n    useEffect(function () {\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        setLoading(true);\r\n        api.get('supports/helpFilters', config).then(function (response) {\r\n            try {\r\n                setFilterVal(response.data);\r\n            }\r\n            catch (e) {\r\n                handleLogout();\r\n            }\r\n        });\r\n        //creating the filter route \r\n        var urlTotalPagesAssignedToMe = \"/supports/pendingHelpsAssignedToMeTotalPages?pagesize=\" + pageSize;\r\n        var urlPendingHelpsAssignedToMe = \"/supports/pendingHelpsAssignedToMe?page=\" + page + \"&pagesize=\" + pageSize;\r\n        if (filterState) {\r\n            for (var key in filterState) {\r\n                var value = filterState[key];\r\n                if (value != null && value != undefined && value != '') {\r\n                    urlTotalPagesAssignedToMe += \"&\" + key + \"=\" + value;\r\n                    urlPendingHelpsAssignedToMe += \"&\" + key + \"=\" + value;\r\n                }\r\n            }\r\n        }\r\n        api.get(urlTotalPagesAssignedToMe, config)\r\n            .then(function (response) {\r\n            setTotalPages(response.data);\r\n            try {\r\n                if (response.data > page) {\r\n                    setHasNext(true);\r\n                }\r\n                else {\r\n                    setHasNext(false);\r\n                }\r\n            }\r\n            catch (e) {\r\n                handleLogout();\r\n                history.push('/');\r\n            }\r\n        });\r\n        api.get(urlPendingHelpsAssignedToMe, config)\r\n            .then(function (response) {\r\n            try {\r\n                setHelps(response.data);\r\n            }\r\n            catch (e) {\r\n                handleLogout();\r\n                history.push('/');\r\n            }\r\n        }).then(function () { return setLoading(false); });\r\n    }, [page, pageSize, filterState]);\r\n    // function to assign the help for yourself\r\n    var assignToMe = function (id) { return __awaiter(void 0, void 0, void 0, function () {\r\n        var urlTotalPages, urlPendingHelps, urlTotalPagesNotAssigned, urlPendingHelpsNotAssigned;\r\n        return __generator(this, function (_a) {\r\n            switch (_a.label) {\r\n                case 0: return [4 /*yield*/, api.patch(\"/supports/\" + id + \"/assignToMe\", '', config)];\r\n                case 1:\r\n                    _a.sent();\r\n                    urlTotalPages = \"/supports/pendingHelpsAssignedToMeTotalPages?pagesize=\" + pageSize;\r\n                    urlPendingHelps = \"/supports/pendingHelpsAssignedToMe?page=\" + page + \"&pagesize=\" + pageSize;\r\n                    urlTotalPagesNotAssigned = \"/supports/pendingHelpsAssignedToTotalPages?pagesize=\" + pageSizeNotAssigned;\r\n                    urlPendingHelpsNotAssigned = \"supports/pendingHelpsAssignedTo?page=\" + pageNotAssigned + \"&pagesize=\" + pageSizeNotAssigned;\r\n                    setLoading(true);\r\n                    setLoadingNotAssigned(true);\r\n                    return [4 /*yield*/, api.get(urlTotalPagesNotAssigned, config)\r\n                            .then(function (response) {\r\n                            setTotalPagesNotAssigned(response.data);\r\n                            try {\r\n                                if (response.data > pageNotAssigned) {\r\n                                    setHasNextNotAssigned(true);\r\n                                }\r\n                                else {\r\n                                    setHasNextNotAssigned(false);\r\n                                }\r\n                            }\r\n                            catch (e) {\r\n                                handleLogout();\r\n                                history.push('/');\r\n                            }\r\n                        })];\r\n                case 2:\r\n                    _a.sent();\r\n                    return [4 /*yield*/, api.get(urlPendingHelpsNotAssigned, config)\r\n                            .then(function (response) {\r\n                            try {\r\n                                setHelpsNotAssigned(response.data);\r\n                            }\r\n                            catch (e) {\r\n                                handleLogout();\r\n                                history.push('/');\r\n                            }\r\n                        }).then(function () { return setLoadingNotAssigned(false); })];\r\n                case 3:\r\n                    _a.sent();\r\n                    return [4 /*yield*/, api.get(urlTotalPages, config)\r\n                            .then(function (response) {\r\n                            setTotalPages(response.data);\r\n                            try {\r\n                                if (response.data > page) {\r\n                                    setHasNext(true);\r\n                                }\r\n                                else {\r\n                                    setHasNext(false);\r\n                                }\r\n                            }\r\n                            catch (e) {\r\n                                handleLogout();\r\n                                history.push('/');\r\n                            }\r\n                        })];\r\n                case 4:\r\n                    _a.sent();\r\n                    return [4 /*yield*/, api.get(urlPendingHelps, config)\r\n                            .then(function (response) {\r\n                            try {\r\n                                setHelps(response.data);\r\n                            }\r\n                            catch (e) {\r\n                                handleLogout();\r\n                                history.push('/');\r\n                            }\r\n                        }).then(function () { return setLoading(false); })];\r\n                case 5:\r\n                    _a.sent();\r\n                    return [2 /*return*/];\r\n            }\r\n        });\r\n    }); };\r\n    var lineBtnsNotAssigned = [\r\n        {\r\n            name: 'Assinar',\r\n            icon: _jsx(BsPen, {}, void 0),\r\n            fn: function (id) {\r\n                assignToMe(id);\r\n            }\r\n        }\r\n    ];\r\n    var lineBtnDetailNotAssigned = {\r\n        name: 'Detalhes',\r\n        icon: _jsx(BsSearch, {}, void 0),\r\n        fn: function (id) {\r\n            //history.push(`/profile/${id}`)\r\n            //Abre o help em uma nova aba.\r\n            window.open(\"/profileNewPage/\" + id, \"_blank\");\r\n            //Marca o help como visualizado.\r\n            var newhelps = __spreadArray([], helpsNotAssigned);\r\n            newhelps.map(function (item) {\r\n                if (item.id === id) {\r\n                    item.viewed = true;\r\n                }\r\n            });\r\n            setHelpsNotAssigned(newhelps);\r\n        }\r\n    };\r\n    lineBtnsNotAssigned.push(lineBtnDetailNotAssigned);\r\n    var lineBtns = [];\r\n    var lineBtnDetail = {\r\n        name: 'Detalhes',\r\n        icon: _jsx(BsSearch, {}, void 0),\r\n        fn: function (id) {\r\n            //history.push(`/profile/${id}`)\r\n            //Abre o help em uma nova aba.\r\n            window.open(\"/profileNewPage/\" + id, \"_blank\");\r\n            //Marca o help como visualizado.\r\n            var newhelps = __spreadArray([], helps);\r\n            newhelps.map(function (item) {\r\n                if (item.id === id) {\r\n                    item.viewed = true;\r\n                }\r\n            });\r\n            setHelps(newhelps);\r\n        }\r\n    };\r\n    lineBtns.push(lineBtnDetail);\r\n    // buttons for table menu\r\n    var menuButtons = [\r\n        {\r\n            id: 3,\r\n            icon: _jsx(GrFilter, {}, void 0),\r\n            title: 'Filtrar',\r\n            fn: function () {\r\n                if (filter === false) {\r\n                    setFilter(true);\r\n                }\r\n                else {\r\n                    setFilter(false);\r\n                }\r\n            }\r\n        },\r\n        {\r\n            id: 2,\r\n            icon: _jsx(FiPlus, {}, void 0),\r\n            title: 'Novo Chamado',\r\n            fn: function () {\r\n                history.push('/create');\r\n            }\r\n        }\r\n    ];\r\n    // buttons for table menu\r\n    var menuButtonsNotAssigned = [\r\n        //POR ENQUANTO NÃO SERÁ NECESSÁRIO TER FILTRO DE PESQUISA DOS NOVOS CHAMADOS (NÃO ASSINADOS PARA ALGUÉM)\r\n        //{\r\n        //    id: 3,\r\n        //    icon: <GrFilter />,\r\n        //    title: 'Filtrar',\r\n        //    fn: () => {\r\n        //        if (filterNotAssigned === false) {\r\n        //            setFilterNotAssigned(true)\r\n        //        }\r\n        //        else {\r\n        //            setFilterNotAssigned(false)\r\n        //        }\r\n        //    }\r\n        //},\r\n        {\r\n            id: 2,\r\n            icon: _jsx(FiPlus, {}, void 0),\r\n            title: 'Novo Chamado',\r\n            fn: function () {\r\n                history.push('/create');\r\n            }\r\n        }\r\n    ];\r\n    var closeFilter = function () {\r\n        setFilter(false);\r\n    };\r\n    var closeFilterNotAssigned = function () {\r\n        setFilterNotAssigned(false);\r\n    };\r\n    function pages() {\r\n        setPage(1);\r\n    }\r\n    return (_jsx(_Fragment, { children: _jsx(\"div\", __assign({ className: styles.container }, { children: _jsxs(\"div\", __assign({ className: styles.containerBlock }, { children: [_jsxs(\"div\", __assign({ className: styles.containerAssignedToMe }, { children: [filter &&\r\n                                _jsx(\"div\", __assign({ className: 'm-4' }, { children: _jsx(Filter, { page: pages, closer: closeFilter, data: filterVal, stateOfFilter: setFilterState }, void 0) }), void 0), _jsx(Table, { setSize: setPageSize, size: pageSize, hasNext: hasNext, page: page, setPage: setPage, data: helps, totalPAges: totalPages, headerButtons: menuButtons, lineButton: lineBtns, title: 'Meus Chamados', exporter: true, loading: loading, columns: [\r\n                                    { label: 'ID', key: 'id', eventClick: lineBtnDetail.fn },\r\n                                    { label: 'TFS', key: 'tfsWorkItem' },\r\n                                    { label: 'Aplicação', key: 'applicationName' },\r\n                                    { label: 'Descrição', key: 'especification', maxLenghtToShowSeeMore: 70 },\r\n                                    { label: 'Status', key: 'statusName' },\r\n                                    { label: 'Empresa', key: 'companyName' },\r\n                                    { label: 'Usuário', key: 'requestUserName' },\r\n                                    { label: 'Data Criação', key: 'creationDateWithTime' },\r\n                                    { label: 'Último Comentário', key: 'lastCommentWithTime' },\r\n                                ] }, void 0)] }), void 0), _jsxs(\"div\", __assign({ className: styles.containerNotAssigned }, { children: [filterNotAssigned &&\r\n                                _jsx(\"div\", __assign({ className: 'm-4' }, { children: _jsx(Filter, { page: pages, closer: closeFilterNotAssigned, data: filterValNotAssigned, stateOfFilter: setFilterStateNotAssigned }, void 0) }), void 0), _jsx(Table, { setSize: setPageSizeNotAssigned, size: pageSizeNotAssigned, hasNext: hasNextNotAssigned, page: pageNotAssigned, setPage: setPageNotAssigned, data: helpsNotAssigned, totalPAges: totalPagesNotAssigned, headerButtons: menuButtonsNotAssigned, lineButton: lineBtnsNotAssigned, exporter: true, loading: loadingNotAssigned, title: 'Novos Chamados', columns: [\r\n                                    { label: 'ID', key: 'id', eventClick: lineBtnDetailNotAssigned.fn },\r\n                                    { label: 'Aplicação', key: 'applicationName' },\r\n                                    { label: 'Descrição', key: 'especification', maxLenghtToShowSeeMore: 60 },\r\n                                    { label: 'Status', key: 'statusName' },\r\n                                    { label: 'Empresa', key: 'companyName' },\r\n                                    { label: 'Usuário', key: 'requestUserName' },\r\n                                    { label: 'Data Criação', key: 'creationDateWithTime' },\r\n                                    { label: 'Último Comentário', key: 'lastCommentWithTime' },\r\n                                ] }, void 0)] }), void 0)] }), void 0) }), void 0) }, void 0));\r\n};\r\nexport default Dashboard;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\r\n    for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n        to[j] = from[i];\r\n    return to;\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { BsSearch } from \"react-icons/bs\";\r\nimport { FiPlus } from \"react-icons/fi\";\r\nimport { GrFilter } from \"react-icons/gr\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport Filter from \"../../components/Filter\";\r\nimport { Table } from 'template/lib';\r\nimport useAuth from \"../../hooks/useAuth\";\r\nimport useTitle from \"../../hooks/useTitle\";\r\nimport api from \"../../services/api\";\r\nvar Search = function () {\r\n    var _a = useAuth(), login = _a.login, handleLogout = _a.handleLogout;\r\n    var setTitle = useTitle().setTitle;\r\n    var history = useHistory();\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    // button function for navigate to detail page\r\n    var lineBtnsWithoutAssginTo = [];\r\n    var buttonDetailEvent = {\r\n        name: 'Detalhes',\r\n        icon: _jsx(BsSearch, {}, void 0),\r\n        fn: function (id) {\r\n            //history.push(`/profile/${id}`)\r\n            //Abre o help em uma nova aba.\r\n            window.open(\"/profileNewPage/\" + id, \"_blank\");\r\n            //Marca o help como visualizado.\r\n            var newhelps = __spreadArray([], helps);\r\n            newhelps.map(function (item) {\r\n                if (item.id === id) {\r\n                    item.viewed = true;\r\n                }\r\n            });\r\n            setHelps(newhelps);\r\n        }\r\n    };\r\n    lineBtnsWithoutAssginTo.push(buttonDetailEvent);\r\n    // buttons for table menu\r\n    var menuButtons = [\r\n        {\r\n            id: 3,\r\n            icon: _jsx(GrFilter, {}, void 0),\r\n            title: 'Filtrar',\r\n            fn: function () {\r\n                if (filter === false) {\r\n                    setFilter(true);\r\n                }\r\n                else {\r\n                    setFilter(false);\r\n                }\r\n            }\r\n        },\r\n        {\r\n            id: 2,\r\n            icon: _jsx(FiPlus, {}, void 0),\r\n            title: 'Novo Suporte',\r\n            fn: function () {\r\n                history.push('/create');\r\n            }\r\n        }\r\n    ];\r\n    var _b = useState([]), helps = _b[0], setHelps = _b[1];\r\n    var _c = useState(1), page = _c[0], setPage = _c[1];\r\n    var _d = useState(15), pageSize = _d[0], setPageSize = _d[1];\r\n    var _e = useState(false), hasNext = _e[0], setHasNext = _e[1];\r\n    var _f = useState(true), filter = _f[0], setFilter = _f[1];\r\n    var _g = useState(0), totalPages = _g[0], setTotalPages = _g[1];\r\n    var _h = useState([]), filterVal = _h[0], setFilterVal = _h[1];\r\n    var _j = useState(), filterState = _j[0], setFilterState = _j[1];\r\n    var _k = useState(true), loading = _k[0], setLoading = _k[1];\r\n    useEffect(function () {\r\n        setTitle('Pesquisa');\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        api.get('supports/helpFilters', config).then(function (response) {\r\n            try {\r\n                setFilterVal(response.data);\r\n            }\r\n            catch (e) {\r\n                handleLogout();\r\n            }\r\n        });\r\n        //creating the filter route \r\n        var urlTotalPages = \"/supports/helpsTotalPages?pagesize=\" + pageSize;\r\n        var urlPendingHelps = \"/supports/helps?page=\" + page + \"&pagesize=\" + pageSize;\r\n        if (filterState) {\r\n            for (var key in filterState) {\r\n                var value = filterState[key];\r\n                if (value != null && value != undefined && value != '') {\r\n                    urlTotalPages += \"&\" + key + \"=\" + value;\r\n                    urlPendingHelps += \"&\" + key + \"=\" + value;\r\n                }\r\n            }\r\n        }\r\n        api.get(urlTotalPages, config)\r\n            .then(function (response) {\r\n            setTotalPages(response.data);\r\n            try {\r\n                if (response.data > page) {\r\n                    setHasNext(true);\r\n                }\r\n                else {\r\n                    setHasNext(false);\r\n                }\r\n            }\r\n            catch (e) {\r\n                handleLogout();\r\n                history.push('/');\r\n            }\r\n        });\r\n        api.get(urlPendingHelps, config)\r\n            .then(function (response) {\r\n            try {\r\n                setHelps(response.data);\r\n            }\r\n            catch (e) {\r\n                handleLogout();\r\n                history.push('/');\r\n            }\r\n        }).then(function () { return setLoading(false); });\r\n    }, [page, pageSize, filterState]);\r\n    function pages() {\r\n        setPage(1);\r\n    }\r\n    return (_jsx(_Fragment, { children: _jsx(\"div\", __assign({ className: 'pb-20 h-screen ' }, { children: _jsxs(\"div\", __assign({ className: 'overflow-auto h-full' }, { children: [filter &&\r\n                        _jsx(\"div\", __assign({ className: 'm-4' }, { children: _jsx(Filter, { page: pages, data: filterVal, stateOfFilter: setFilterState }, void 0) }), void 0), _jsx(Table, { loading: loading, setSize: setPageSize, size: pageSize, hasNext: hasNext, page: page, setPage: setPage, data: helps, totalPAges: totalPages, headerButtons: menuButtons, lineButton: lineBtnsWithoutAssginTo, exporter: true, title: 'Chamados', columns: [\r\n                            { label: 'ID', key: 'id', eventClick: buttonDetailEvent.fn },\r\n                            { label: 'TFS', key: 'tfsWorkItem' },\r\n                            { label: 'Aplicação', key: 'applicationName' },\r\n                            { label: 'Descrição', key: 'especification', maxLenghtToShowSeeMore: 15 },\r\n                            { label: 'Assinado para', key: 'assignedToName' },\r\n                            { label: 'Status', key: 'statusName' },\r\n                            { label: 'Empresa', key: 'companyName' },\r\n                            { label: 'Usuário', key: 'requestUserName' },\r\n                            { label: 'Data Criação', key: 'creationDateWithTime' },\r\n                            { label: 'Data Conclusão', key: 'closedDateWithTime' },\r\n                        ] }, void 0)] }), void 0) }), void 0) }, void 0));\r\n};\r\nexport default Search;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useFormik } from 'formik';\r\nimport { useEffect } from 'react';\r\nimport { useState } from 'react';\r\nimport { AiOutlineClose } from 'react-icons/ai';\r\nimport Modal from 'react-modal';\r\nimport { useHistory } from 'react-router-dom';\r\nimport useAuth from '../../../hooks/useAuth';\r\nimport api from '../../../services/api';\r\nimport * as Yup from 'yup';\r\nimport styles from './styles.module.scss';\r\nimport { Button, InputText, InputSelect } from 'template/lib';\r\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\r\nModal.setAppElement('#root');\r\nvar ModalAddress = function (props) {\r\n    var _a = useState([]), state = _a[0], setState = _a[1];\r\n    var _b = useState(''), stateId = _b[0], setStateId = _b[1];\r\n    var _c = useState([]), cities = _c[0], setCities = _c[1];\r\n    var history = useHistory();\r\n    var _d = useAuth(), login = _d.login, handleLogout = _d.handleLogout;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        api.get('companies/getStates', config).then(function (response) {\r\n            setState(response.data);\r\n        });\r\n        if (stateId) {\r\n            api.get(\"companies/getCitiesByStateId?stateId=\" + stateId, config).then(function (response) {\r\n                setCities(response.data);\r\n            });\r\n        }\r\n    }, [stateId]);\r\n    var addressSchema = Yup.object().shape({\r\n        city: Yup.string().required('precisa'),\r\n        street: Yup.string()\r\n            .min(3, 'Por favor, informe pelo menos 3 caracteres.')\r\n            .required('Por favor, informe uma rua.'),\r\n        district: Yup.string()\r\n            .min(3, 'Por favor, informe pelo menos 3 caracteres.')\r\n            .required('Por favor, informe um bairro.'),\r\n        number: Yup.number()\r\n            .required('Por favor, informe um número.'),\r\n        zipcode: Yup.string()\r\n            .min(8, 'Por favor, informe pelo menos 3 caracteres.')\r\n            .required('Por favor, informe uma senha.'),\r\n    });\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            city: '',\r\n            street: '',\r\n            district: '',\r\n            number: '',\r\n            zipcode: ''\r\n        },\r\n        validationSchema: addressSchema,\r\n        onSubmit: function (values, actions) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        _a.trys.push([0, 2, , 3]);\r\n                        return [4 /*yield*/, api.post(\"companies/\" + props.companyId + \"/addresses\", values, config)];\r\n                    case 1:\r\n                        _a.sent();\r\n                        actions.resetForm({\r\n                            values: {\r\n                                city: '',\r\n                                street: '',\r\n                                district: '',\r\n                                number: '',\r\n                                zipcode: ''\r\n                            },\r\n                        });\r\n                        props.setRefresh(true);\r\n                        props.handlecloseModalAddress();\r\n                        return [3 /*break*/, 3];\r\n                    case 2:\r\n                        err_1 = _a.sent();\r\n                        if (!login || Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n                            handleLogout();\r\n                            history.push('/');\r\n                        }\r\n                        alert('erro');\r\n                        return [3 /*break*/, 3];\r\n                    case 3: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); },\r\n    });\r\n    var columns = 1;\r\n    var states = {\r\n        label: 'Estado',\r\n        options: state\r\n    };\r\n    var citiesSelect = {\r\n        label: 'Cidade',\r\n        options: cities ? cities : []\r\n    };\r\n    return (_jsx(\"div\", { children: _jsx(Modal, __assign({ isOpen: props.modalIsOpenAddress, shouldCloseOnOverlayClick: false, onRequestClose: props.handlecloseModalAddress, overlayClassName: 'react-modal-overly', className: 'react-modal-content', contentLabel: \"Example Modal\" }, { children: _jsxs(\"div\", __assign({ className: '' }, { children: [_jsxs(\"div\", __assign({ className: styles.header }, { children: [_jsx(\"div\", {}, void 0), _jsx(\"h2\", __assign({ className: ' font-semibold border-b-2 text-lg' }, { children: \"Adicionar Endere\\u00E7o\" }), void 0), _jsx(AiOutlineClose, { title: 'Fechar', className: 'cursor-pointer text-sm', onClick: props.handlecloseModalAddress }, void 0)] }), void 0), _jsx(\"div\", __assign({ className: styles.content }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, className: 'mx-4 my-4' }, { children: [_jsx(\"div\", __assign({ className: 'grid justify-items-start' }, { children: _jsxs(\"div\", __assign({ className: \"grid grid-cols-1 md:grid-cols-\" + columns + \" lg:grid-cols-\" + columns + \" my-2 justify-items-end\" }, { children: [_jsx(InputSelect, { onChange: function (e) { return setStateId(e.target.value); }, name: 'stateId', value: stateId, values: states, valueMember: 'code', displayMember: 'name', firstOption: 'Selecione um estado' }, void 0), _jsx(InputSelect, { onChange: formik.handleChange, value: formik.values.city, name: 'city', values: citiesSelect, valueMember: 'id', displayMember: 'name', firstOption: 'Selecione uma cidade' }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'street', label: 'Rua', inicialValue: formik.values.street }, void 0), formik.errors.street && formik.touched.street && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.street }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'district', label: 'Bairro', inicialValue: formik.values.district }, void 0), formik.errors.district && formik.touched.district && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.district }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'number', label: 'N\\u00FAmero', inicialValue: formik.values.number }, void 0), formik.errors.number && formik.touched.number && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.number }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'zipcode', label: 'CEP', inicialValue: formik.values.zipcode }, void 0), formik.errors.zipcode && formik.touched.zipcode && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.zipcode }), void 0)] }), void 0) }), void 0), _jsx(\"div\", __assign({ className: styles.flexButton }, { children: _jsx(Button, __assign({ type: 'submit', className: '' }, { children: \"Salvar\" }), void 0) }), void 0)] }), void 0) }), void 0)] }), void 0) }), void 0) }, void 0));\r\n};\r\nexport default ModalAddress;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { FiPlus } from \"react-icons/fi\";\r\nimport useAuth from \"../../../hooks/useAuth\";\r\nimport api from \"../../../services/api\";\r\nimport Modaladdress from \"../../Modals/ModalAddress\";\r\nimport styles from './styles.module.scss';\r\nimport { Table } from 'template/lib';\r\nvar AddressTab = function (props) {\r\n    var _a = useState(0), idtoChange = _a[0], setIdToChange = _a[1];\r\n    var _b = useState(1), page = _b[0], setPage = _b[1];\r\n    var _c = useState(10), pageSize = _c[0], setPageSize = _c[1];\r\n    var _d = useState(false), hasNext = _d[0], setHasNext = _d[1];\r\n    var _e = useState(1), totalPages = _e[0], setTotalPages = _e[1];\r\n    var _f = useState([]), items = _f[0], setItems = _f[1];\r\n    var _g = useState(), adresState = _g[0], setAdressState = _g[1];\r\n    var _h = useState(false), refresh = _h[0], setRefresh = _h[1];\r\n    var _j = useState(true), loading = _j[0], setLoading = _j[1];\r\n    var login = useAuth().login;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        setLoading(true);\r\n        setItems([]);\r\n        api.get(\"/companies/\" + props.companyId + \"/addresses\", config).then(function (response) {\r\n            setItems(response.data);\r\n        }).then(function () { return setLoading(false); });\r\n        if (refresh === true) {\r\n            setRefresh(false);\r\n        }\r\n    }, [props.companyId, refresh, page, pageSize]);\r\n    useEffect(function () {\r\n        if (idtoChange == 0) {\r\n            return;\r\n        }\r\n        setLoading(true);\r\n        api.put(\"/companies/\" + props.companyId + \"/addresses/\" + idtoChange, adresState, config).then(function (response) {\r\n            setItems(response.data);\r\n        }).then(function () { return setLoading(false); });\r\n    }, [adresState, idtoChange]);\r\n    var _k = useState(false), modalIsOpenAddress = _k[0], setIsOpenAddress = _k[1];\r\n    function handleOpenModalAddress() {\r\n        setIsOpenAddress(true);\r\n    }\r\n    function handlecloseModalAddress() {\r\n        setIsOpenAddress(false);\r\n    }\r\n    var menuBtn = [\r\n        {\r\n            fn: function () { return handleOpenModalAddress(); },\r\n            icon: _jsx(FiPlus, { size: 16 }, void 0),\r\n            id: 1,\r\n            title: 'Novo Endereço'\r\n        }\r\n    ];\r\n    return (_jsxs(_Fragment, { children: [_jsx(\"div\", __assign({ className: styles.container }, { children: _jsx(Table, { setSize: setPageSize, hasNext: hasNext, page: page, setPage: setPage, data: items, setData: setItems, loading: loading, changeExistentContent: setAdressState, totalPAges: totalPages, title: 'Endere\\u00E7os', refresh: setRefresh, headerButtons: menuBtn, editable: true, setIdToChange: setIdToChange, columns: [\r\n                        { label: 'Estado', key: 'select_state' },\r\n                        { label: 'Cidade', key: 'select_city' },\r\n                        { label: 'Rua', key: 'street' },\r\n                        { label: 'Bairro', key: 'neighborhood' },\r\n                        { label: 'Número', key: 'number' },\r\n                        { label: 'CEP', key: 'zipcode' }\r\n                    ] }, void 0) }), void 0), _jsx(Modaladdress, { setRefresh: setRefresh, companyId: props.companyId, modalIsOpenAddress: modalIsOpenAddress, handleOpenModalAddress: handleOpenModalAddress, handlecloseModalAddress: handlecloseModalAddress }, void 0)] }, void 0));\r\n};\r\nexport default AddressTab;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useFormik } from 'formik';\r\nimport { useEffect } from 'react';\r\nimport { useState } from 'react';\r\nimport { AiOutlineClose } from 'react-icons/ai';\r\nimport Modal from 'react-modal';\r\nimport { useHistory } from 'react-router-dom';\r\nimport useAuth from '../../../hooks/useAuth';\r\nimport api from '../../../services/api';\r\nimport * as Yup from 'yup';\r\nimport styles from './styles.module.scss';\r\nimport { Button, InputSelect, InputText } from 'template/lib';\r\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\r\nModal.setAppElement('#root');\r\nvar ModalLicenses = function (props) {\r\n    var _a = useState([]), renovationMets = _a[0], setRenovationMets = _a[1];\r\n    var _b = useState([]), product = _b[0], setProduct = _b[1];\r\n    var _c = useState([]), updateMethod = _c[0], setUpdateMethod = _c[1];\r\n    var _d = useState([]), licenseRenov = _d[0], setLicenseRenov = _d[1];\r\n    var history = useHistory();\r\n    var _e = useAuth(), login = _e.login, handleLogout = _e.handleLogout;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        api.get('helps/products', config).then(function (response) {\r\n            setProduct(response.data);\r\n        });\r\n        api.get('licenses/updateMethods', config).then(function (response) {\r\n            setUpdateMethod(response.data);\r\n        });\r\n        api.get('licenses/licenseRecurrences', config).then(function (response) {\r\n            setLicenseRenov(response.data);\r\n        });\r\n        api.get('licenses/renovationMethods', config).then(function (response) {\r\n            setRenovationMets(response.data);\r\n        });\r\n    }, []);\r\n    var licenseSchema = Yup.object().shape({\r\n        product: Yup.string()\r\n            .required('Por favor, informe um produto.'),\r\n        licenseRecurrenceId: Yup.string()\r\n            .required('Por favor, informe a forma de recorrência.'),\r\n        updateMethod: Yup.string()\r\n            .required('Por favor, informe um método de atualização.'),\r\n        renovationMethod: Yup.string()\r\n            .required('Por favor, informe um método de renovação.'),\r\n        dueDay: Yup.number()\r\n            .required('Por favor, informe um produto.'),\r\n        licenseFee: Yup.string()\r\n            .required('Por favor, informe um valor.')\r\n            .transform(function (value) { return value.replace(',', '.'); }) // Converte vírgula para ponto\r\n            .test('is-number', 'O valor deve ser um número.', function (value) { return !isNaN(value); } // Valida se é um número\r\n        )\r\n            .test('max-two-decimals', 'O valor deve ter no máximo 2 casas decimais.', function (value) {\r\n            if (!value || isNaN(value))\r\n                return true; // Ignora se não for um número\r\n            var _a = value.split('.'), _ = _a[0], decimals = _a[1];\r\n            return !decimals || decimals.length <= 2; // Valida as casas decimais\r\n        }),\r\n        quantity: Yup.number()\r\n            .required('Por favor, informe uma quantidade.')\r\n            .typeError('A quantidade deve ser um número inteiro.'),\r\n    });\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            product: '',\r\n            updateMethod: '',\r\n            licenseRecurrenceId: '',\r\n            renovationMethod: '',\r\n            dueDay: '',\r\n            licenseFee: '',\r\n            quantity: '',\r\n            details: ''\r\n        },\r\n        validationSchema: licenseSchema,\r\n        onSubmit: function (values, actions) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        console.log(values);\r\n                        values.licenseFee = values.licenseFee.replace(\",\", \".\");\r\n                        _a.label = 1;\r\n                    case 1:\r\n                        _a.trys.push([1, 3, , 4]);\r\n                        return [4 /*yield*/, api.post(\"licenses?companyId=\" + props.companyId, values, config)];\r\n                    case 2:\r\n                        _a.sent();\r\n                        actions.resetForm({\r\n                            values: {\r\n                                product: '',\r\n                                updateMethod: '',\r\n                                licenseRecurrenceId: '',\r\n                                renovationMethod: '',\r\n                                dueDay: '',\r\n                                licenseFee: '',\r\n                                quantity: '',\r\n                                details: ''\r\n                            },\r\n                        });\r\n                        props.setRefresh(true);\r\n                        props.handlecloseModalLicenses();\r\n                        return [3 /*break*/, 4];\r\n                    case 3:\r\n                        err_1 = _a.sent();\r\n                        if (!login || Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n                            handleLogout();\r\n                            history.push('/');\r\n                        }\r\n                        alert('erro');\r\n                        return [3 /*break*/, 4];\r\n                    case 4: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); },\r\n    });\r\n    var columns = 1;\r\n    var renovationMethods = {\r\n        label: 'Metodo de Renovação',\r\n        options: renovationMets\r\n    };\r\n    var products = {\r\n        label: 'Produtos',\r\n        options: product\r\n    };\r\n    var updateMethods = {\r\n        label: 'Modo de Atualização',\r\n        options: updateMethod\r\n    };\r\n    var recurrenceLicense = {\r\n        label: 'Recorrências',\r\n        options: licenseRenov\r\n    };\r\n    return (_jsx(\"div\", { children: _jsx(Modal, __assign({ isOpen: props.modalIsOpenLicenses, shouldCloseOnOverlayClick: false, onRequestClose: props.handlecloseModalLicenses, overlayClassName: 'react-modal-overly', className: 'react-modal-content', contentLabel: \"Example Modal\" }, { children: _jsxs(\"div\", __assign({ className: '' }, { children: [_jsxs(\"div\", __assign({ className: styles.header }, { children: [_jsx(\"div\", {}, void 0), _jsx(\"h2\", __assign({ className: ' font-semibold border-b-2 text-lg' }, { children: \"Adicionar Licen\\u00E7a\" }), void 0), _jsx(AiOutlineClose, { title: 'Fechar', className: 'cursor-pointer text-sm', onClick: props.handlecloseModalLicenses }, void 0)] }), void 0), _jsx(\"div\", __assign({ className: styles.content }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, className: 'mx-4 my-4' }, { children: [_jsx(\"div\", __assign({ className: 'grid justify-items-start' }, { children: _jsxs(\"div\", __assign({ className: \"grid grid-cols-1 md:grid-cols-\" + columns + \" lg:grid-cols-\" + columns + \" my-2 justify-items-end\" }, { children: [_jsx(InputSelect, { onChange: formik.handleChange, value: formik.values.product, name: 'product', values: products, valueMember: 'id', displayMember: 'name', firstOption: 'Selecione um produto' }, void 0), formik.errors.product && formik.touched.product && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.product }), void 0), _jsx(InputSelect, { onChange: formik.handleChange, value: formik.values.updateMethod, name: 'updateMethod', values: updateMethods, valueMember: 'id', displayMember: 'nome', firstOption: 'Selecione um método de atualização' }, void 0), formik.errors.updateMethod && formik.touched.updateMethod && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.updateMethod }), void 0), _jsx(InputSelect, { onChange: formik.handleChange, value: formik.values.licenseRecurrenceId, name: 'licenseRecurrenceId', values: recurrenceLicense, valueMember: 'id', displayMember: 'name', firstOption: 'Selecione uma recorrência' }, void 0), formik.errors.licenseRecurrenceId && formik.touched.licenseRecurrenceId && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.licenseRecurrenceId }), void 0), _jsx(InputSelect, { onChange: formik.handleChange, value: formik.values.renovationMethod, name: 'renovationMethod', values: renovationMethods, valueMember: 'id', displayMember: 'methodName', firstOption: 'Selecione um Método' }, void 0), formik.errors.renovationMethod && formik.touched.renovationMethod && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.renovationMethod }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'dueDay', label: 'Dia de vencimento', inicialValue: formik.values.dueDay }, void 0), formik.errors.dueDay && formik.touched.dueDay && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: \"Por favor, informe um dia em n\\u00FAmeros.\" }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'licenseFee', label: 'Valor R$', inicialValue: formik.values.licenseFee }, void 0), formik.errors.licenseFee && formik.touched.licenseFee && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.licenseFee }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'quantity', label: 'Quantidade', inicialValue: formik.values.quantity }, void 0), formik.errors.quantity && formik.touched.quantity && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.quantity }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'details', label: 'Detalhes', inicialValue: formik.values.details }, void 0)] }), void 0) }), void 0), _jsx(\"div\", __assign({ className: styles.flexButton }, { children: _jsx(Button, __assign({ type: 'submit', className: '' }, { children: \"Salvar\" }), void 0) }), void 0)] }), void 0) }), void 0)] }), void 0) }), void 0) }, void 0));\r\n};\r\nexport default ModalLicenses;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useFormik } from 'formik';\r\nimport { useEffect } from 'react';\r\nimport { useState } from 'react';\r\nimport { AiOutlineClose } from 'react-icons/ai';\r\nimport Modal from 'react-modal';\r\nimport { useHistory } from 'react-router-dom';\r\nimport useAuth from '../../../hooks/useAuth';\r\nimport api from '../../../services/api';\r\nimport * as Yup from 'yup';\r\nimport styles from './styles.module.scss';\r\nimport { Button, InputSelect, InputText, InputDate } from 'template/lib';\r\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\r\nModal.setAppElement('#root');\r\nvar ModalLicensesRenov = function (props) {\r\n    var _a = useState([]), renovationMets = _a[0], setRenovationMets = _a[1];\r\n    var history = useHistory();\r\n    var _b = useAuth(), login = _b.login, handleLogout = _b.handleLogout;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        api.get('licenses/renovationMethods', config).then(function (response) {\r\n            setRenovationMets(response.data);\r\n        });\r\n    }, []);\r\n    var licenseSchema = Yup.object().shape({\r\n        renovationDate: Yup.string()\r\n            .required('Por favor, informe uma data.'),\r\n        expirationDate: Yup.string()\r\n            .required('Por favor, informe uma data.'),\r\n        renovationMethod: Yup.number()\r\n            .required('Por favor, informe um método.'),\r\n    });\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            renovationDate: '',\r\n            expirationDate: '',\r\n            renovationMethod: '',\r\n            details: ''\r\n        },\r\n        validationSchema: licenseSchema,\r\n        onSubmit: function (values, actions) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        _a.trys.push([0, 2, , 3]);\r\n                        return [4 /*yield*/, api.post(\"licenses/\" + props.LicenseId + \"/licenseRenovations?companyId=\" + props.companyId, values, config)];\r\n                    case 1:\r\n                        _a.sent();\r\n                        actions.resetForm({\r\n                            values: {\r\n                                renovationDate: '',\r\n                                expirationDate: '',\r\n                                renovationMethod: '',\r\n                                details: ''\r\n                            },\r\n                        });\r\n                        props.setRefresh(true);\r\n                        props.handlecloseModalLicensesRenov();\r\n                        return [3 /*break*/, 3];\r\n                    case 2:\r\n                        err_1 = _a.sent();\r\n                        if (!login || Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n                            handleLogout();\r\n                            history.push('/');\r\n                        }\r\n                        alert('erro');\r\n                        return [3 /*break*/, 3];\r\n                    case 3: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); },\r\n    });\r\n    var columns = 1;\r\n    var renovationMethods = {\r\n        label: 'Metodo de Renovação',\r\n        options: renovationMets\r\n    };\r\n    return (_jsx(\"div\", { children: _jsx(Modal, __assign({ isOpen: props.modalIsOpenLicensesRenov, shouldCloseOnOverlayClick: false, onRequestClose: props.handlecloseModalLicensesRenov, overlayClassName: 'react-modal-overly', className: 'react-modal-content', contentLabel: \"Example Modal\" }, { children: _jsxs(\"div\", __assign({ className: '' }, { children: [_jsxs(\"div\", __assign({ className: styles.header }, { children: [_jsx(\"div\", {}, void 0), _jsx(\"h2\", __assign({ className: ' font-semibold border-b-2 text-lg' }, { children: \"Adicionar Renova\\u00E7\\u00E3o de Licen\\u00E7a\" }), void 0), _jsx(AiOutlineClose, { title: 'Fechar', className: 'cursor-pointer text-sm', onClick: props.handlecloseModalLicensesRenov }, void 0)] }), void 0), _jsx(\"div\", __assign({ className: styles.content }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, className: 'mx-4 my-4' }, { children: [_jsx(\"div\", __assign({ className: 'grid justify-items-start' }, { children: _jsxs(\"div\", __assign({ className: \"grid grid-cols-1 md:grid-cols-\" + columns + \" lg:grid-cols-\" + columns + \" my-2 justify-items-end\" }, { children: [_jsx(InputDate, { onChange: formik.handleChange, inicialValue: formik.values.renovationDate, name: 'renovationDate', label: 'Data de Renovação' }, void 0), formik.errors.renovationDate && formik.touched.renovationDate && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.renovationDate }), void 0), _jsx(InputDate, { onChange: formik.handleChange, inicialValue: formik.values.expirationDate, name: 'expirationDate', label: 'Data de Expiração' }, void 0), formik.errors.expirationDate && formik.touched.expirationDate && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.expirationDate }), void 0), _jsx(InputSelect, { onChange: formik.handleChange, value: formik.values.renovationMethod, name: 'renovationMethod', values: renovationMethods, valueMember: 'id', displayMember: 'methodName', firstOption: 'Selecione um Método' }, void 0), formik.errors.renovationMethod && formik.touched.renovationMethod && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.renovationMethod }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'details', label: 'Detalhes', inicialValue: formik.values.details }, void 0), formik.errors.details && formik.touched.details && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.details }), void 0)] }), void 0) }), void 0), _jsx(\"div\", __assign({ className: styles.flexButton }, { children: _jsx(Button, __assign({ type: 'submit', className: '' }, { children: \"Salvar\" }), void 0) }), void 0)] }), void 0) }), void 0)] }), void 0) }), void 0) }, void 0));\r\n};\r\nexport default ModalLicensesRenov;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\n// <reference path=\"../Company.tsx\" />\r\nimport { AiOutlineClose } from 'react-icons/ai';\r\nimport Modal from 'react-modal';\r\nimport useAuth from '../../../hooks/useAuth';\r\nimport api from '../../../services/api';\r\nimport styles from './styles.module.scss';\r\nimport { Alert, Button } from 'template/lib';\r\nimport { useState } from 'react';\r\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\r\nModal.setAppElement('#root');\r\nvar ModalConfirmation = function (props) {\r\n    var _a;\r\n    var login = useAuth().login;\r\n    var _b = useState(false), confirmationError = _b[0], setConfirmationError = _b[1];\r\n    var _c = useState(''), errMessage = _c[0], setErrorMessage = _c[1];\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    var handleDelete = function () { return __awaiter(void 0, void 0, void 0, function () {\r\n        var response, err_1;\r\n        return __generator(this, function (_a) {\r\n            switch (_a.label) {\r\n                case 0:\r\n                    _a.trys.push([0, 2, , 3]);\r\n                    return [4 /*yield*/, api.delete(props.url, config)];\r\n                case 1:\r\n                    response = _a.sent();\r\n                    console.log(props.refresh);\r\n                    if (props.refresh == null || props.refresh == undefined) {\r\n                        props.setRefresh(true);\r\n                    }\r\n                    else {\r\n                        props.setRefresh(!props.refresh);\r\n                    }\r\n                    if (props.setState) {\r\n                        props.setState(false);\r\n                    }\r\n                    closeModal();\r\n                    return [3 /*break*/, 3];\r\n                case 2:\r\n                    err_1 = _a.sent();\r\n                    if (err_1.response.data.message) {\r\n                        setErrorMessage(err_1.response.data.message);\r\n                    }\r\n                    else if (err_1.response.data.detail) {\r\n                        setErrorMessage(err_1.response.data.detail);\r\n                    }\r\n                    setConfirmationError(true);\r\n                    return [3 /*break*/, 3];\r\n                case 3: return [2 /*return*/];\r\n            }\r\n        });\r\n    }); };\r\n    var closeModal = function () {\r\n        props.handlecloseModalConfirmation();\r\n        setErrorMessage('');\r\n        setConfirmationError(false);\r\n    };\r\n    return (_jsx(\"div\", __assign({ className: 'h-24' }, { children: _jsxs(Modal, __assign({ isOpen: props.modalIsOpenConfirmation, shouldCloseOnOverlayClick: false, onRequestClose: props.handlecloseModalConfirmation, overlayClassName: 'react-modal-overly', className: 'react-modal-content', contentLabel: \"Example Modal\" }, { children: [_jsxs(\"div\", __assign({ className: styles.header }, { children: [_jsx(\"div\", {}, void 0), _jsxs(\"h2\", __assign({ className: ' font-semibold border-b-2 text-lg' }, { children: [\"Tem certeza que deseja \", (_a = props.methodTitle) !== null && _a !== void 0 ? _a : 'excluir', \" \", props.title, \"? \"] }), void 0), _jsx(AiOutlineClose, { title: 'Fechar', className: 'cursor-pointer text-sm', onClick: closeModal }, void 0)] }), void 0), confirmationError ? (_jsx(\"div\", __assign({ className: styles.withError }, { children: _jsxs(Alert, { children: [_jsx(\"strong\", { children: \"Erro! \" }, void 0), errMessage] }, void 0) }), void 0)) : _jsx(\"div\", { className: styles.withOutError }, void 0), _jsx(\"div\", __assign({ className: styles.content }, { children: _jsxs(\"div\", __assign({ className: 'flex w-full p-10 justify-center gap-24 ' }, { children: [_jsx(Button, __assign({ onClick: closeModal }, { children: \"Cancelar\" }), void 0), _jsx(Button, __assign({ onClick: handleDelete }, { children: \"Confirmar\" }), void 0)] }), void 0) }), void 0)] }), void 0) }), void 0));\r\n};\r\nexport default ModalConfirmation;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { BsSearch, BsTrash } from \"react-icons/bs\";\r\nimport { FiPlus } from \"react-icons/fi\";\r\nimport { MdAutorenew } from \"react-icons/md\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport useAuth from \"../../../hooks/useAuth\";\r\nimport api from \"../../../services/api\";\r\nimport ModalLicenses from \"../../Modals/ModalLicenses\";\r\nimport ModalLicensesRenov from \"../../Modals/ModalLicensesRenov\";\r\nimport { GiCancel, GiConfirmed } from 'react-icons/gi';\r\nimport { FiDownload } from \"react-icons/fi\";\r\nimport ModalConfirmation from \"../../Modals/ModalConfirmation\";\r\nimport { Table } from 'template/lib';\r\nimport styles from './styles.module.scss';\r\nimport apiUrl from '../../../services/apiUrl';\r\nvar LicensessTab = function (props) {\r\n    var _a = useState(0), idtoChange = _a[0], setIdToChange = _a[1];\r\n    var _b = useState(false), refresh = _b[0], setRefresh = _b[1];\r\n    var _c = useState(false), refreshRenov = _c[0], setRefreshRenov = _c[1];\r\n    var _d = useState([]), details = _d[0], setDetails = _d[1];\r\n    var _e = useState(1), pageDetails = _e[0], setPageDetails = _e[1];\r\n    var _f = useState(10), pageSizeDetails = _f[0], setPageSizeDetails = _f[1];\r\n    var _g = useState(false), hasNextDetails = _g[0], setHasNextDetails = _g[1];\r\n    var _h = useState(1), totalPagesDetails = _h[0], setTotalPagesDetails = _h[1];\r\n    var _j = useState(false), detailsTable = _j[0], setDetailsTable = _j[1];\r\n    var _k = useState(true), loading = _k[0], setLoading = _k[1];\r\n    var _l = useState(true), loadingDetails = _l[0], setLoadingDetails = _l[1];\r\n    var _m = useState(''), titleOfLicense = _m[0], setTitleOfLicense = _m[1];\r\n    var history = useHistory();\r\n    var _o = useState(-1), save = _o[0], setSave = _o[1];\r\n    var _p = useState(1), page = _p[0], setPage = _p[1];\r\n    var _q = useState(10), pageSize = _q[0], setPageSize = _q[1];\r\n    var _r = useState(false), hasNext = _r[0], setHasNext = _r[1];\r\n    var _s = useState(1), totalPages = _s[0], setTotalPages = _s[1];\r\n    var _t = useState([]), items = _t[0], setItems = _t[1];\r\n    var _u = useState([]), licensesState = _u[0], setLicensesState = _u[1];\r\n    var _v = useState(0), idLicense = _v[0], setIdLicense = _v[1];\r\n    var _w = useState(), contentToChange = _w[0], setContentToChange = _w[1];\r\n    var _x = useState(0), idLicenseRenov = _x[0], setidLicenseRenov = _x[1];\r\n    var _y = useState(0), idtoChangeDetails = _y[0], setIdToChangeDetails = _y[1];\r\n    var login = useAuth().login;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        if ((login === null || login === void 0 ? void 0 : login.role) === 'Administrator') {\r\n            api.get(\"licenses/licensesByCompanyId?companyId=\" + props.companyId, config).then(function (response) {\r\n                setItems(response.data);\r\n            }).then(function () { return setLoading(false); });\r\n            if (refresh === true) {\r\n                setRefresh(false);\r\n            }\r\n        }\r\n        else {\r\n            api.get(\"licenses/licensesByCompanyIdReadOnly?companyId=\" + props.companyId, config).then(function (response) {\r\n                setItems(response.data);\r\n            }).then(function () { return setLoading(false); });\r\n            if (refresh === true) {\r\n                setRefresh(false);\r\n            }\r\n        }\r\n    }, [props.companyId, refresh, page, pageSize]);\r\n    useEffect(function () {\r\n        setDetailsTable(false);\r\n    }, [props.companyId]);\r\n    useEffect(function () {\r\n        if (refreshRenov === true) {\r\n            api.get(\"licenses/\" + idLicense + \"/licenseRenovations\", config).then(function (response) {\r\n                if (idtoChange > 0) {\r\n                    setIdLicense(idtoChange);\r\n                }\r\n                setDetails(response.data.renovations);\r\n                setRefreshRenov(false);\r\n                setRefresh(true);\r\n            });\r\n        }\r\n    }, [refreshRenov, pageSizeDetails]);\r\n    useEffect(function () {\r\n        if (idtoChange == 0) {\r\n            return;\r\n        }\r\n        api.put(\"licenses/\" + idtoChange, licensesState, config).then(function (response) { });\r\n    }, [licensesState, idtoChange]);\r\n    useEffect(function () {\r\n        if (idtoChangeDetails == 0) {\r\n            return;\r\n        }\r\n        api.put(\"licenses/licenseRenovation/\" + idtoChangeDetails, contentToChange, config).then(function (response) { });\r\n    }, [contentToChange, idtoChangeDetails]);\r\n    var lineBtnsWithoutAssginTo;\r\n    if ((login === null || login === void 0 ? void 0 : login.role) === 'Administrator') {\r\n        lineBtnsWithoutAssginTo = [\r\n            {\r\n                name: 'Detalhes',\r\n                icon: _jsx(BsSearch, { className: '' }, void 0),\r\n                fn: function (id) {\r\n                    api.get(\"licenses/\" + id + \"/licenseRenovations\", config).then(function (response) {\r\n                        setIdLicense(id);\r\n                        setDetails(response.data.renovations);\r\n                        setTitleOfLicense(response.data.renovationTitle);\r\n                        setDetailsTable(true);\r\n                    }).then(function () { return setLoadingDetails(false); });\r\n                }\r\n            },\r\n            {\r\n                name: 'Excluir',\r\n                icon: _jsx(BsTrash, { size: 14, className: '' }, void 0),\r\n                fn: function (id) {\r\n                    setidLicenseRenov(id);\r\n                    handleOpenModalConfirmationLicense();\r\n                }\r\n            },\r\n            {\r\n                name: 'Download Instalador',\r\n                icon: _jsx(FiDownload, { size: 16 }, void 0),\r\n                fn: function (id) {\r\n                    window.open(apiUrl + \"licenses/\" + id + \"/download-installer\", \"_blank\");\r\n                },\r\n                hideWithCondition: true\r\n            }\r\n        ];\r\n    }\r\n    else {\r\n        lineBtnsWithoutAssginTo = [\r\n            {\r\n                name: 'Detalhes',\r\n                icon: _jsx(BsSearch, { className: '' }, void 0),\r\n                fn: function (id) {\r\n                    api.get(\"licenses/\" + id + \"/licenseRenovations\", config).then(function (response) {\r\n                        setIdLicense(id);\r\n                        setDetails(response.data.renovations);\r\n                        setTitleOfLicense(response.data.renovationTitle);\r\n                        setDetailsTable(true);\r\n                    }).then(function () { return setLoadingDetails(false); });\r\n                }\r\n            },\r\n            {\r\n                name: 'Download Instalador',\r\n                icon: _jsx(FiDownload, { size: 16 }, void 0),\r\n                fn: function (id) {\r\n                    window.open(apiUrl + \"licenses/\" + id + \"/download-installer\", \"_blank\");\r\n                },\r\n                hideWithCondition: true\r\n            }\r\n        ];\r\n    }\r\n    var lineBtnsWithoutAssginToDetails;\r\n    if ((login === null || login === void 0 ? void 0 : login.role) === 'Administrator') {\r\n        lineBtnsWithoutAssginToDetails = [\r\n            {\r\n                name: 'Excluir',\r\n                icon: _jsx(BsTrash, { size: 14, className: '' }, void 0),\r\n                fn: function (id) {\r\n                    setidLicenseRenov(id);\r\n                    handleOpenModalConfirmationLicenseRenov();\r\n                }\r\n            },\r\n            {\r\n                name: 'Resetar',\r\n                icon: _jsx(MdAutorenew, { size: 16, className: 'text-sm' }, void 0),\r\n                fn: function (id) {\r\n                    setSave(id);\r\n                }\r\n            },\r\n        ];\r\n    }\r\n    else {\r\n        lineBtnsWithoutAssginToDetails = [\r\n            {\r\n                name: 'Resetar',\r\n                icon: _jsx(MdAutorenew, { size: 16, className: 'text-sm' }, void 0),\r\n                fn: function (id) {\r\n                    setSave(id);\r\n                }\r\n            },\r\n        ];\r\n    }\r\n    var lineBtnsWithoutAssginToDetailsSave = [\r\n        {\r\n            name: 'Confirmar',\r\n            icon: _jsxs(\"div\", __assign({ className: styles.divConfirmReset }, { children: [_jsx(GiConfirmed, { size: 16 }, void 0), \" \"] }), void 0),\r\n            id: save,\r\n            fn: function (id) {\r\n                api.patch(\"licenses/\" + idLicense + \"/licenseRenovations/\" + id + \"/reset\", '', config).then(function (response) { return console.log(response.data); }).then(function () { return setSave(0); }).then(function () {\r\n                    api.get(\"licenses/\" + idLicense + \"/licenseRenovations\", config).then(function (response) {\r\n                        setDetails(response.data.renovations);\r\n                    });\r\n                });\r\n            }\r\n        },\r\n        {\r\n            name: 'Cancelar',\r\n            icon: _jsxs(\"div\", __assign({ className: styles.divCancelReset }, { children: [\" \", _jsx(GiCancel, { size: 16 }, void 0), \" \"] }), void 0),\r\n            id: save,\r\n            fn: function (id) {\r\n                setSave(-1);\r\n            }\r\n        }\r\n    ];\r\n    var menuBtn = [];\r\n    if ((login === null || login === void 0 ? void 0 : login.role) === 'Administrator') {\r\n        menuBtn = [\r\n            {\r\n                fn: function () { return handleOpenModalLicenses(); },\r\n                icon: _jsx(FiPlus, { size: 16 }, void 0),\r\n                id: 1,\r\n                title: 'Nova Licença'\r\n            }\r\n        ];\r\n    }\r\n    var menuBtnRenov = [];\r\n    if ((login === null || login === void 0 ? void 0 : login.role) === 'Administrator') {\r\n        menuBtnRenov = [\r\n            {\r\n                fn: function () { return handleOpenModalLicensesRenov(); },\r\n                icon: _jsx(FiPlus, { size: 16 }, void 0),\r\n                id: 1,\r\n                title: 'Nova Licença'\r\n            }\r\n        ];\r\n    }\r\n    var _z = useState(false), modalIsOpenLicenses = _z[0], setIsOpenLicenses = _z[1];\r\n    function handleOpenModalLicenses() {\r\n        setIsOpenLicenses(true);\r\n    }\r\n    function handlecloseModalLicenses() {\r\n        setIsOpenLicenses(false);\r\n    }\r\n    var _0 = useState(false), modalIsOpenLicensesRenov = _0[0], setIsOpenLicensesRenov = _0[1];\r\n    function handleOpenModalLicensesRenov() {\r\n        setIsOpenLicensesRenov(true);\r\n    }\r\n    function handlecloseModalLicensesRenov() {\r\n        setIsOpenLicensesRenov(false);\r\n    }\r\n    var _1 = useState(false), modalIsOpenConfirmationLincese = _1[0], setIsOpenConfirmationLicense = _1[1];\r\n    function handleOpenModalConfirmationLicense() {\r\n        setIsOpenConfirmationLicense(true);\r\n    }\r\n    function handlecloseModalConfirmationLicense() {\r\n        setIsOpenConfirmationLicense(false);\r\n    }\r\n    var _2 = useState(false), modalIsOpenConfirmationLinceseRenov = _2[0], setIsOpenConfirmationLicenseRenov = _2[1];\r\n    function handleOpenModalConfirmationLicenseRenov() {\r\n        setIsOpenConfirmationLicenseRenov(true);\r\n    }\r\n    function handlecloseModalConfirmationLicenseRenov() {\r\n        setIsOpenConfirmationLicenseRenov(false);\r\n    }\r\n    return (_jsxs(_Fragment, { children: [_jsxs(\"div\", __assign({ className: styles.container }, { children: [_jsx(\"div\", __assign({ className: \"\" + (detailsTable ? styles.fisrtContentBoxBreak : styles.fisrtContentBox) }, { children: (login === null || login === void 0 ? void 0 : login.role) === 'Administrator'\r\n                            ?\r\n                                _jsx(Table, { setSize: setPageSize, hasNext: hasNext, page: page, setPage: setPage, highLightLine: true, data: items, refresh: setRefresh, setData: setItems, headerButtons: menuBtn, lineButton: lineBtnsWithoutAssginTo, changeExistentContent: setLicensesState, totalPAges: totalPages, title: 'Licen\\u00E7as', loading: loading, editable: true, setIdToChange: setIdToChange, columns: [\r\n                                        { label: 'Produto', key: 'select_products' },\r\n                                        { label: 'Quantidade', key: 'quantity' },\r\n                                        { label: 'Valor', key: 'licenseFee' },\r\n                                        { label: 'Status', key: 'select_status' },\r\n                                        { label: 'Modo de Atualização', key: 'select_methods' },\r\n                                        { label: 'Recorrência', key: 'select_recorrencies' },\r\n                                        { label: 'Detalhes', key: 'details' }\r\n                                    ] }, void 0)\r\n                            :\r\n                                _jsx(Table, { setSize: setPageSize, hasNext: hasNext, page: page, setPage: setPage, data: items, refresh: setRefresh, setData: setItems, highLightLine: true, headerButtons: menuBtn, lineButton: lineBtnsWithoutAssginTo, changeExistentContent: setLicensesState, totalPAges: totalPages, title: 'Licen\\u00E7as', loading: loading, setIdToChange: setIdToChange, columns: [\r\n                                        { label: 'Produto', key: 'product' },\r\n                                        { label: 'Quantidade', key: 'quantity' },\r\n                                        { label: 'Status', key: 'status' },\r\n                                        { label: 'Modo de Atualização', key: 'updateMethod' },\r\n                                        { label: 'Recorrência', key: 'recurrence' },\r\n                                        { label: 'Detalhes', key: 'details' }\r\n                                    ] }, void 0) }), void 0), detailsTable &&\r\n                        _jsx(\"div\", { className: 'h-0.5 w-full bg-gray-200' }, void 0), _jsx(\"div\", __assign({ className: \"\" + (detailsTable && styles.detailsTable) }, { children: detailsTable &&\r\n                            _jsx(_Fragment, { children: _jsx(Table, { setSize: setPageSizeDetails, size: pageSizeDetails, hasNext: hasNextDetails, page: pageDetails, setPage: setPageDetails, data: details, headerButtons: menuBtnRenov, totalPAges: totalPagesDetails, loading: loadingDetails, changeExistentContent: setContentToChange, setData: setDetails, setIdToChange: setIdToChangeDetails, lineButton: lineBtnsWithoutAssginToDetails, lineButtonForEach: lineBtnsWithoutAssginToDetailsSave, editable: (login === null || login === void 0 ? void 0 : login.role) === 'Administrator', title: titleOfLicense, columns: [\r\n                                        { label: 'Data Renovação', key: 'dateRenovation' },\r\n                                        { label: 'Data Expiração', key: 'dateExpiration' },\r\n                                        { label: 'Número da Licença', key: 'licenseNumber' },\r\n                                        { label: 'Última Validação', key: 'dateLastValidation' },\r\n                                        { label: 'Detalhes', key: 'renovationDetails' },\r\n                                        { label: 'Número Serial', key: 'hdSerialNumber' },\r\n                                        { label: 'Usuário do Domínio', key: 'userDomain' },\r\n                                        { label: 'Versão Instalada', key: 'softwareLicence' }\r\n                                    ] }, void 0) }, void 0) }), void 0)] }), void 0), _jsx(ModalLicenses, { companyId: props.companyId, setRefresh: setRefresh, modalIsOpenLicenses: modalIsOpenLicenses, handleOpenModalLicenses: handleOpenModalLicenses, handlecloseModalLicenses: handlecloseModalLicenses }, void 0), _jsx(ModalLicensesRenov, { LicenseId: idLicense, companyId: props.companyId, setRefresh: setRefreshRenov, modalIsOpenLicensesRenov: modalIsOpenLicensesRenov, handleOpenModalLicensesRenov: handleOpenModalLicensesRenov, handlecloseModalLicensesRenov: handlecloseModalLicensesRenov }, void 0), _jsx(ModalConfirmation, { setState: setDetailsTable, method: 'delete', url: \"licenses/\" + idLicenseRenov, title: 'essa licença', setRefresh: setRefresh, modalIsOpenConfirmation: modalIsOpenConfirmationLincese, handleOpenModalConfirmation: handleOpenModalConfirmationLicense, handlecloseModalConfirmation: handlecloseModalConfirmationLicense }, void 0), _jsx(ModalConfirmation, { method: 'delete', url: \"licenses/licenseRenovation/\" + idLicenseRenov, title: 'essa renovação de licença', setRefresh: setRefreshRenov, modalIsOpenConfirmation: modalIsOpenConfirmationLinceseRenov, handleOpenModalConfirmation: handleOpenModalConfirmationLicenseRenov, handlecloseModalConfirmation: handlecloseModalConfirmationLicenseRenov }, void 0)] }, void 0));\r\n};\r\nexport default LicensessTab;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useFormik } from 'formik';\r\nimport { useEffect } from 'react';\r\nimport * as Yup from 'yup';\r\nimport { AiOutlineClose } from 'react-icons/ai';\r\nimport Modal from 'react-modal';\r\nimport { useHistory } from 'react-router-dom';\r\nimport useAuth from '../../../hooks/useAuth';\r\nimport api from '../../../services/api';\r\nimport styles from './styles.module.scss';\r\nimport { Button, InputText } from 'template/lib';\r\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\r\nModal.setAppElement('#root');\r\nvar ModalOtherInfo = function (props) {\r\n    var history = useHistory();\r\n    var _a = useAuth(), login = _a.login, handleLogout = _a.handleLogout;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n    }, []);\r\n    var otherInfoSchema = Yup.object().shape({\r\n        type: Yup.string()\r\n            .min(3, 'Por favor, informe pelo menos 3 caracteres.')\r\n            .required('Por favor, informe um tipo.'),\r\n        info: Yup.string()\r\n            .min(3, 'Por favor, informe pelo menos 3 caracteres.')\r\n            .required('Por favor, informe uma informação.'),\r\n    });\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            type: '',\r\n            info: '',\r\n            details: ''\r\n        },\r\n        validationSchema: otherInfoSchema,\r\n        onSubmit: function (values, actions) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        _a.trys.push([0, 2, , 3]);\r\n                        return [4 /*yield*/, api.post(\"companies/\" + props.companyId + \"/otherInfos\", values, config)];\r\n                    case 1:\r\n                        _a.sent();\r\n                        actions.resetForm({\r\n                            values: {\r\n                                type: '',\r\n                                info: '',\r\n                                details: ''\r\n                            },\r\n                        });\r\n                        props.setRefresh(true);\r\n                        props.handlecloseModalOtherInfo();\r\n                        return [3 /*break*/, 3];\r\n                    case 2:\r\n                        err_1 = _a.sent();\r\n                        if (!login || Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n                            handleLogout();\r\n                            history.push('/');\r\n                        }\r\n                        alert('erro');\r\n                        return [3 /*break*/, 3];\r\n                    case 3: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); },\r\n    });\r\n    var columns = 1;\r\n    return (_jsx(\"div\", { children: _jsx(Modal, __assign({ isOpen: props.modalIsOpenOtherInfo, shouldCloseOnOverlayClick: false, onRequestClose: props.handlecloseModalOtherInfo, overlayClassName: 'react-modal-overly', className: 'react-modal-content', contentLabel: \"Example Modal\" }, { children: _jsxs(\"div\", __assign({ className: '' }, { children: [_jsxs(\"div\", __assign({ className: styles.header }, { children: [_jsx(\"div\", {}, void 0), _jsx(\"h2\", __assign({ className: ' font-semibold border-b-2 text-lg' }, { children: \"Adicionar Outras Informa\\u00E7\\u00F5es\" }), void 0), _jsx(AiOutlineClose, { title: 'Fechar', className: 'cursor-pointer text-sm', onClick: props.handlecloseModalOtherInfo }, void 0)] }), void 0), _jsx(\"div\", __assign({ className: styles.content }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, className: 'mx-4 my-4' }, { children: [_jsx(\"div\", __assign({ className: 'grid justify-items-start' }, { children: _jsxs(\"div\", __assign({ className: \"grid grid-cols-1 md:grid-cols-\" + columns + \" lg:grid-cols-\" + columns + \" my-2 justify-items-end\" }, { children: [_jsx(InputText, { onChange: formik.handleChange, name: 'type', label: 'Tipo', inicialValue: formik.values.type }, void 0), formik.errors.type && formik.touched.type && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.type }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'info', label: 'Informa\\u00E7\\u00F5es', inicialValue: formik.values.info }, void 0), formik.errors.info && formik.touched.info && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.info }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'details', label: 'Detalhes', inicialValue: formik.values.details }, void 0)] }), void 0) }), void 0), _jsx(\"div\", __assign({ className: styles.flexButton }, { children: _jsx(Button, __assign({ type: 'submit', className: '' }, { children: \"Salvar\" }), void 0) }), void 0)] }), void 0) }), void 0)] }), void 0) }), void 0) }, void 0));\r\n};\r\nexport default ModalOtherInfo;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { FiPlus } from \"react-icons/fi\";\r\nimport useAuth from \"../../../hooks/useAuth\";\r\nimport api from \"../../../services/api\";\r\nimport ModalOtherInfo from \"../../Modals/ModalOtherInfo\";\r\nimport { Table } from 'template/lib';\r\nimport styles from './styles.module.scss';\r\nvar OtherInfosTab = function (props) {\r\n    var _a = useState(0), idtoChange = _a[0], setIdToChange = _a[1];\r\n    var _b = useState(1), page = _b[0], setPage = _b[1];\r\n    var _c = useState(10), pageSize = _c[0], setPageSize = _c[1];\r\n    var _d = useState(false), hasNext = _d[0], setHasNext = _d[1];\r\n    var _e = useState(1), totalPages = _e[0], setTotalPages = _e[1];\r\n    var _f = useState([]), items = _f[0], setItems = _f[1];\r\n    var _g = useState([]), otherInfoState = _g[0], setOtherInfoState = _g[1];\r\n    var _h = useState(false), refresh = _h[0], setRefresh = _h[1];\r\n    var _j = useState(true), loading = _j[0], setLoading = _j[1];\r\n    var login = useAuth().login;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        //api.get(`GetOtherInfo?companyId=${props.companyId}`, config).then(response => {\r\n        api.get(\"companies/\" + props.companyId + \"/otherInfos\", config).then(function (response) {\r\n            setItems(response.data);\r\n        }).then(function () { return setLoading(false); }); /////////////\r\n        if (refresh === true) {\r\n            setRefresh(false);\r\n        }\r\n    }, [props.companyId, refresh, page, pageSize]);\r\n    useEffect(function () {\r\n        if (idtoChange == 0) {\r\n            return;\r\n        }\r\n        //api.put(`changeAddInfo?id=${idtoChange}`, otherInfoState, config).then(response => {\r\n        api.put(\"companies/\" + props.companyId + \"/otherInfos/\" + idtoChange, otherInfoState, config).then(function (response) {\r\n        });\r\n    }, [otherInfoState, idtoChange]);\r\n    var _k = useState(false), modalIsOpenOtherInfo = _k[0], setIsOpenOtherInfo = _k[1];\r\n    function handleOpenModalOtherInfo() {\r\n        setIsOpenOtherInfo(true);\r\n    }\r\n    function handlecloseModalOtherInfo() {\r\n        setIsOpenOtherInfo(false);\r\n    }\r\n    var menuBtn = [\r\n        {\r\n            fn: function () { return handleOpenModalOtherInfo(); },\r\n            icon: _jsx(FiPlus, { size: 16 }, void 0),\r\n            id: 1,\r\n            title: 'Nova Informação'\r\n        }\r\n    ];\r\n    return (_jsxs(_Fragment, { children: [_jsx(\"div\", __assign({ className: styles.container }, { children: _jsx(Table, { setSize: setPageSize, hasNext: hasNext, page: page, setPage: setPage, data: items, setData: setItems, changeExistentContent: setOtherInfoState, totalPAges: totalPages, refresh: setRefresh, headerButtons: menuBtn, title: 'Outras informa\\u00E7\\u00F5es', setIdToChange: setIdToChange, editable: true, loading: loading, columns: [\r\n                        { label: 'Tipo', key: 'type' },\r\n                        { label: 'Informações', key: 'info' },\r\n                        { label: 'Detalhes', key: 'details' },\r\n                    ] }, void 0) }), void 0), _jsx(ModalOtherInfo, { companyId: props.companyId, setRefresh: setRefresh, modalIsOpenOtherInfo: modalIsOpenOtherInfo, handleOpenModalOtherInfo: handleOpenModalOtherInfo, handlecloseModalOtherInfo: handlecloseModalOtherInfo }, void 0)] }, void 0));\r\n};\r\nexport default OtherInfosTab;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useFormik } from 'formik';\r\nimport { useEffect } from 'react';\r\nimport { useState } from 'react';\r\nimport { AiOutlineClose } from 'react-icons/ai';\r\nimport Modal from 'react-modal';\r\nimport { useHistory } from 'react-router-dom';\r\nimport useAuth from '../../../hooks/useAuth';\r\nimport api from '../../../services/api';\r\nimport * as Yup from 'yup';\r\nimport styles from './styles.module.scss';\r\nimport { Button, InputSelect, InputText } from 'template/lib';\r\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\r\nModal.setAppElement('#root');\r\nvar ModalUsers = function (props) {\r\n    var _a = useState([]), userRole = _a[0], setUserRole = _a[1];\r\n    var history = useHistory();\r\n    var _b = useAuth(), login = _b.login, handleLogout = _b.handleLogout;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        api.get('companies/getUserRoles', config).then(function (response) {\r\n            setUserRole(response.data);\r\n        });\r\n    }, []);\r\n    useEffect(function () {\r\n        if (props.modalIsOpenUsers) {\r\n            resetFormValues();\r\n        }\r\n    }, [props.modalIsOpenUsers]);\r\n    var userSchema = Yup.object().shape({\r\n        userRoleId: Yup.string()\r\n            .required('Por favor, informe o nível de permissão do usuário.'),\r\n        name: Yup.string()\r\n            .min(3, 'Por favor, informe pelo menos 3 caracteres.')\r\n            .required('Por favor, informe um nome.'),\r\n        email: Yup.string()\r\n            .min(3, 'Por favor, informe pelo menos 3 caracteres.')\r\n            .email('Por favor, inform um e-mail válido.')\r\n            .required('Por favor, informe um e-mail.')\r\n            .test('is-unique', 'Por favor, utileze outro email. Este ja está em uso', function (value) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var ret;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0: return [4 /*yield*/, api.get(\"companies/getUserByEmail?email=\" + value, config)];\r\n                    case 1:\r\n                        ret = _a.sent();\r\n                        if (!ret.data[0]) {\r\n                            return [2 /*return*/, true];\r\n                        }\r\n                        return [2 /*return*/, false];\r\n                }\r\n            });\r\n        }); })\r\n    });\r\n    function resetFormValues() {\r\n        formik.resetForm({\r\n            values: {\r\n                userRoleId: '',\r\n                name: '',\r\n                email: '',\r\n                cell: '',\r\n                phone: '',\r\n                function: '',\r\n                position: '',\r\n            },\r\n        });\r\n    }\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            userRoleId: '',\r\n            name: '',\r\n            email: '',\r\n            cell: '',\r\n            phone: '',\r\n            function: '',\r\n            position: '',\r\n        },\r\n        validationSchema: userSchema,\r\n        onSubmit: function (values, actions) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        _a.trys.push([0, 2, , 3]);\r\n                        return [4 /*yield*/, api.post(\"companies/\" + props.companyId + \"/users\", values, config).then(function () {\r\n                                resetFormValues();\r\n                                props.setRefresh(true);\r\n                                props.handlecloseModalUsers();\r\n                            })];\r\n                    case 1:\r\n                        _a.sent();\r\n                        return [3 /*break*/, 3];\r\n                    case 2:\r\n                        err_1 = _a.sent();\r\n                        if (!login || Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n                            handleLogout();\r\n                            history.push('/');\r\n                        }\r\n                        alert('erro');\r\n                        return [3 /*break*/, 3];\r\n                    case 3: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); },\r\n    });\r\n    var columns = 1;\r\n    var userRoles = {\r\n        label: 'Permissões de usuário',\r\n        options: userRole\r\n    };\r\n    return (_jsx(\"div\", { children: _jsx(Modal, __assign({ isOpen: props.modalIsOpenUsers, shouldCloseOnOverlayClick: false, onRequestClose: props.handlecloseModalUsers, overlayClassName: 'react-modal-overly', className: 'react-modal-content', contentLabel: \"Example Modal\" }, { children: _jsxs(\"div\", __assign({ className: '' }, { children: [_jsxs(\"div\", __assign({ className: styles.header }, { children: [_jsx(\"div\", {}, void 0), _jsx(\"h2\", __assign({ className: ' font-semibold border-b-2 text-lg' }, { children: \"Adicionar Usu\\u00E1rio\" }), void 0), _jsx(AiOutlineClose, { title: 'Fechar', className: 'cursor-pointer text-sm', onClick: props.handlecloseModalUsers }, void 0)] }), void 0), _jsx(\"div\", __assign({ className: styles.content }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, className: 'mx-4 my-4' }, { children: [_jsx(\"div\", __assign({ className: 'grid justify-items-start' }, { children: _jsxs(\"div\", __assign({ className: \"grid grid-cols-1 md:grid-cols-\" + columns + \" lg:grid-cols-\" + columns + \" my-2 justify-items-end\" }, { children: [_jsx(InputSelect, { onChange: formik.handleChange, value: formik.values.userRoleId, name: 'userRoleId', values: userRoles, valueMember: 'id', displayMember: 'name', firstOption: 'Selecione um nível' }, void 0), formik.errors.userRoleId && formik.touched.userRoleId && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.userRoleId }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'name', label: 'Nome', inicialValue: formik.values.name }, void 0), formik.errors.name && formik.touched.name && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.name }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'email', label: 'E-mail', inicialValue: formik.values.email }, void 0), formik.errors.email && formik.touched.email && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.email }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'cell', label: 'Celular', inicialValue: formik.values.cell }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'phone', label: 'Telefone', inicialValue: formik.values.phone }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'function', label: 'Fun\\u00E7\\u00E3o', inicialValue: formik.values.function, maxLength: 100 }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'position', label: 'Cargo', inicialValue: formik.values.position, maxLength: 100 }, void 0)] }), void 0) }), void 0), _jsx(\"div\", __assign({ className: styles.flexButton }, { children: _jsx(Button, __assign({ type: 'submit', className: '' }, { children: \"Salvar\" }), void 0) }), void 0)] }), void 0) }), void 0)] }), void 0) }), void 0) }, void 0));\r\n};\r\nexport default ModalUsers;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { FiPlus } from \"react-icons/fi\";\r\nimport useAuth from \"../../../hooks/useAuth\";\r\nimport api from \"../../../services/api\";\r\nimport ModalUsers from \"../../Modals/ModalUsers\";\r\nimport { Table } from 'template/lib';\r\nimport styles from './styles.module.scss';\r\nvar UsersTab = function (props) {\r\n    var _a = useState(0), idtoChange = _a[0], setIdToChange = _a[1];\r\n    var _b = useState(1), page = _b[0], setPage = _b[1];\r\n    var _c = useState(15), pageSize = _c[0], setPageSize = _c[1];\r\n    var _d = useState(false), hasNext = _d[0], setHasNext = _d[1];\r\n    var _e = useState(0), totalPages = _e[0], setTotalPages = _e[1];\r\n    var _f = useState([]), items = _f[0], setItems = _f[1];\r\n    var _g = useState([]), userState = _g[0], setUserState = _g[1];\r\n    var _h = useState(false), refresh = _h[0], setRefresh = _h[1];\r\n    var _j = useState(true), loading = _j[0], setLoading = _j[1];\r\n    var login = useAuth().login;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        api.get(\"/companies/\" + props.companyId + \"/usersTotalPages?pageSize=\" + pageSize, config)\r\n            .then(function (response) {\r\n            setTotalPages(response.data);\r\n            if (response.data > page) {\r\n                setHasNext(true);\r\n            }\r\n            else {\r\n                setHasNext(false);\r\n            }\r\n        });\r\n        api.get(\"/companies/\" + props.companyId + \"/users?page=\" + page + \"&pageSize=\" + pageSize, config).then(function (response) {\r\n            setItems(response.data);\r\n        }).then(function () { return setLoading(false); });\r\n        if (refresh === true) {\r\n            setRefresh(false);\r\n        }\r\n    }, [props.companyId, refresh, page, pageSize]);\r\n    useEffect(function () {\r\n        if (idtoChange == 0) {\r\n            return;\r\n        }\r\n        api.put(\"/companies/\" + props.companyId + \"/users/\" + idtoChange, userState, config).then(function (response) {\r\n        });\r\n    }, [userState, idtoChange]);\r\n    var _k = useState(false), modalIsOpenUsers = _k[0], setIsOpenUsers = _k[1];\r\n    function handleOpenModalUsers() {\r\n        setIsOpenUsers(true);\r\n    }\r\n    function handlecloseModalUsers() {\r\n        setIsOpenUsers(false);\r\n    }\r\n    var menuBtn = [\r\n        {\r\n            fn: function () { return handleOpenModalUsers(); },\r\n            icon: _jsx(FiPlus, { size: 16 }, void 0),\r\n            id: 1,\r\n            title: 'Novo Usuário'\r\n        }\r\n    ];\r\n    return (_jsxs(_Fragment, { children: [_jsx(\"div\", __assign({ className: styles.container }, { children: _jsx(Table, { setSize: setPageSize, size: pageSize, hasNext: hasNext, page: page, setPage: setPage, data: items, setData: setItems, changeExistentContent: setUserState, totalPAges: totalPages, headerButtons: menuBtn, refresh: setRefresh, loading: loading, title: 'Usu\\u00E1rios', setIdToChange: setIdToChange, editable: true, columns: [\r\n                        { label: 'Id', key: 'id' },\r\n                        { label: 'Data Cadastro', key: 'dateRegistration' },\r\n                        { label: 'Status', key: 'select_status' },\r\n                        { label: 'Tipo', key: 'select_role' },\r\n                        { label: 'Nome', key: 'name' },\r\n                        { label: 'Email', key: 'email' },\r\n                        { label: 'Celular', key: 'cell' },\r\n                        { label: 'Telefone', key: 'phone' },\r\n                        { label: 'Função', key: 'function' },\r\n                        { label: 'Cargo', key: 'position' },\r\n                    ] }, void 0) }), void 0), _jsx(ModalUsers, { setRefresh: setRefresh, companyId: props.companyId, modalIsOpenUsers: modalIsOpenUsers, handleOpenModalUsers: handleOpenModalUsers, handlecloseModalUsers: handlecloseModalUsers }, void 0)] }, void 0));\r\n};\r\nexport default UsersTab;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useFormik } from 'formik';\r\nimport { useEffect } from 'react';\r\nimport { useState } from 'react';\r\nimport { AiOutlineClose } from 'react-icons/ai';\r\nimport Modal from 'react-modal';\r\nimport { useHistory } from 'react-router-dom';\r\nimport useAuth from '../../../hooks/useAuth';\r\nimport api from '../../../services/api';\r\nimport * as Yup from 'yup';\r\nimport styles from './styles.module.scss';\r\nimport { Button, InputSelect, InputText } from 'template/lib';\r\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\r\nModal.setAppElement('#root');\r\nvar ModalCompany = function (props) {\r\n    var _a = useState([]), companiesState = _a[0], setCompaniesState = _a[1];\r\n    var _b = useState([]), supportOpt = _b[0], setSupportOpt = _b[1];\r\n    var _c = useState([]), modalitiesOpt = _c[0], setModalities = _c[1];\r\n    var history = useHistory();\r\n    var _d = useAuth(), login = _d.login, handleLogout = _d.handleLogout;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        api.get('companies/getSupportUsers', config).then(function (response) {\r\n            setSupportOpt(response.data);\r\n        });\r\n        api.get('companies/getModalities', config).then(function (response) {\r\n            setModalities(response.data);\r\n        });\r\n    }, []);\r\n    var compnaySchema = Yup.object().shape({\r\n        helper: Yup.string()\r\n            .required('O campo Técnico responsável é obrigatório.'),\r\n        name: Yup.string()\r\n            .required('O campo Nome é obrigatório.')\r\n            .max(50, 'O campo Nome deve conter no máximo 50 caracteres.'),\r\n        wpsId: Yup.number()\r\n            .required('O campo Wps Id é obrigatório.')\r\n            .moreThan(0, 'O campo Wps Id deve ser maior que zero.')\r\n            .max(2147483647, 'O valor máximo para o campo Wps Id é 2147483647.'),\r\n        cpf: Yup.string()\r\n            .nullable()\r\n            .matches(/^[0-9]+$/, 'O campo CPF deve conter apenas números.')\r\n            .min(11, 'O campo CPF deve conter 11 dígitos.')\r\n            .max(11, 'O campo CPF deve conter 11 dígitos.'),\r\n        cnpj: Yup.string()\r\n            .nullable()\r\n            .matches(/^[0-9]+$/, 'O campo CNPJ deve conter apenas números.')\r\n            .min(14, 'O campo CNPJ deve conter 14 dígitos.')\r\n            .max(14, 'O campo CNPJ deve conter 14 dígitos.')\r\n    });\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            name: '',\r\n            helper: '',\r\n            wpsId: '',\r\n            cpf: '',\r\n            cnpj: '',\r\n            isImplantation: false,\r\n            modality: null,\r\n        },\r\n        validationSchema: compnaySchema,\r\n        onSubmit: function (values, actions) { return __awaiter(void 0, void 0, void 0, function () {\r\n            return __generator(this, function (_a) {\r\n                api.post(\"companies\", values, config).then(function (response) {\r\n                    actions.resetForm({\r\n                        values: {\r\n                            name: '',\r\n                            helper: '',\r\n                            wpsId: '',\r\n                            cpf: '',\r\n                            cnpj: '',\r\n                            isImplantation: false,\r\n                            modality: null,\r\n                        },\r\n                    });\r\n                    props.setId(response.data);\r\n                    props.handlecloseModalCompany();\r\n                });\r\n                return [2 /*return*/];\r\n            });\r\n        }); }\r\n    });\r\n    var columns = 1;\r\n    var companyState = {\r\n        label: 'Status da empresa',\r\n        options: companiesState\r\n    };\r\n    var SupportUsers = {\r\n        label: 'Técnico responsável',\r\n        options: supportOpt\r\n    };\r\n    var Modalities = {\r\n        label: 'Modalidade',\r\n        options: modalitiesOpt\r\n    };\r\n    return (_jsx(\"div\", { children: _jsx(Modal, __assign({ isOpen: props.modalIsOpenCompany, shouldCloseOnOverlayClick: false, onRequestClose: props.handlecloseModalCompany, overlayClassName: 'react-modal-overly', className: 'react-modal-content', contentLabel: \"Example Modal\" }, { children: _jsxs(\"div\", __assign({ className: '' }, { children: [_jsxs(\"div\", __assign({ className: styles.header }, { children: [_jsx(\"div\", {}, void 0), _jsx(\"h2\", __assign({ className: ' font-semibold border-b-2 text-lg' }, { children: \"Adicionar Empresa\" }), void 0), _jsx(AiOutlineClose, { title: 'Fechar', className: 'cursor-pointer text-sm', onClick: props.handlecloseModalCompany }, void 0)] }), void 0), _jsx(\"div\", __assign({ className: styles.content }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, className: 'mx-4 my-4' }, { children: [_jsx(\"div\", __assign({ className: 'grid justify-items-start' }, { children: _jsxs(\"div\", __assign({ className: \"grid grid-cols-1 md:grid-cols-\" + columns + \" lg:grid-cols-\" + columns + \" my-2 justify-items-end\" }, { children: [_jsx(InputSelect, { value: formik.values.helper, name: 'helper', onChange: formik.handleChange, values: SupportUsers, valueMember: 'id', displayMember: 'name' }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'name', label: 'Nome', inicialValue: formik.values.name }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'wpsId', label: 'Wps Id', inicialValue: formik.values.wpsId }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'cpf', label: 'CPF', inicialValue: formik.values.cpf }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'cnpj', label: 'CNPJ', inicialValue: formik.values.cnpj }, void 0), _jsxs(\"div\", __assign({ className: styles.containerCheckBoxInput }, { children: [_jsx(\"label\", __assign({ className: styles.labelImplantationa }, { children: \"Implanta\\u00E7\\u00E3o:\" }), void 0), _jsx(\"input\", { onChange: formik.handleChange, name: 'isImplantation', type: \"checkbox\", checked: formik.values.isImplantation }, void 0)] }), void 0), _jsx(InputSelect, { resize: false, value: formik.values.modality, name: 'modality', onChange: formik.handleChange, values: Modalities, valueMember: 'id', displayMember: 'name' }, void 0), formik.errors.helper && formik.touched.helper && _jsx(\"i\", __assign({ className: 'w-full flex justify-center text-red-400' }, { children: formik.errors.helper }), void 0), formik.errors.name && formik.touched.name && _jsx(\"i\", __assign({ className: 'w-full flex justify-center text-red-400' }, { children: formik.errors.name }), void 0), formik.errors.wpsId && formik.touched.wpsId && _jsx(\"i\", __assign({ className: 'w-full flex justify-center text-red-400' }, { children: formik.errors.wpsId }), void 0), formik.errors.cpf && formik.touched.cpf && _jsx(\"i\", __assign({ className: 'w-full flex justify-center text-red-400' }, { children: formik.errors.cpf }), void 0), formik.errors.cnpj && formik.touched.cnpj && _jsx(\"i\", __assign({ className: 'w-full flex justify-center text-red-400' }, { children: formik.errors.cnpj }), void 0)] }), void 0) }), void 0), _jsx(\"div\", __assign({ className: styles.flexButton }, { children: _jsx(Button, __assign({ type: 'submit', className: '' }, { children: \"Salvar\" }), void 0) }), void 0)] }), void 0) }), void 0)] }), void 0) }), void 0) }, void 0));\r\n};\r\nexport default ModalCompany;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\r\nimport { useFormik } from \"formik\";\r\nimport { useEffect } from \"react\";\r\nimport { useState } from \"react\";\r\nimport { FiPlus } from \"react-icons/fi\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport useAuth from \"../../hooks/useAuth\";\r\nimport useTitle from \"../../hooks/useTitle\";\r\nimport api from \"../../services/api\";\r\nimport AddressTab from \"./../CompaniesTab/Address\";\r\nimport LicensessTab from \"./../CompaniesTab/Licenses\";\r\nimport OtherInfosTab from \"./../CompaniesTab/OtherInfo\";\r\nimport UsersTab from \"./../CompaniesTab/Users\";\r\nimport ModalCompany from \"./../Modals/ModalCompany\";\r\nimport { Button, InputText, InputSelect, TabContents, InputDate } from 'template/lib';\r\nimport * as Yup from 'yup';\r\nimport styles from './styles.module.scss';\r\nimport Select from 'react-select';\r\nvar Company = function () {\r\n    var _a, _b;\r\n    var _c = useAuth(), login = _c.login, handleLogout = _c.handleLogout;\r\n    var setTitle = useTitle().setTitle;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    var _d = useState(0), id = _d[0], setId = _d[1];\r\n    var _e = useState([]), supportOpt = _e[0], setSupportOpt = _e[1];\r\n    var _f = useState([]), companiesToSelect = _f[0], setCompaniesToSelect = _f[1];\r\n    var _g = useState(), companyInfo = _g[0], setCompanyInfo = _g[1];\r\n    var _h = useState([]), tabs = _h[0], setTabs = _h[1];\r\n    var _j = useState([]), statusSelect = _j[0], setStatusSelect = _j[1];\r\n    var _k = useState(false), refresh = _k[0], setRefresh = _k[1];\r\n    var _l = useState([]), modalityOptions = _l[0], setModalityOptions = _l[1];\r\n    useEffect(function () {\r\n        setTitle('Empresas');\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        api.get('/companies', config).then(function (response) {\r\n            setCompaniesToSelect(response.data);\r\n        });\r\n    }, []);\r\n    useEffect(function () {\r\n        if (id === 0) {\r\n            return;\r\n        }\r\n        api.get(\"/companies/\" + id, config).then(function (response) {\r\n            setStatusSelect(response.data.status.select);\r\n            setSupportOpt(response.data.helper.select);\r\n            setModalityOptions(response.data.modality.select);\r\n            setCompanyInfo(response.data);\r\n            setTabs([\r\n                {\r\n                    name: 'Endereço',\r\n                    ComponentVal: _jsx(AddressTab, { companyId: id }, void 0)\r\n                },\r\n                {\r\n                    name: 'Usuários',\r\n                    ComponentVal: _jsx(UsersTab, { companyId: id }, void 0)\r\n                },\r\n                {\r\n                    name: 'Licenças',\r\n                    ComponentVal: _jsx(LicensessTab, { companyId: id }, void 0)\r\n                },\r\n                {\r\n                    name: 'Informações',\r\n                    ComponentVal: _jsx(OtherInfosTab, { companyId: id }, void 0)\r\n                }\r\n            ]);\r\n        });\r\n    }, [id]);\r\n    var handleFindCompanyById = function (e) {\r\n        //e.preventDefault()\r\n        //setId(e.target.value)\r\n        setId(e.value);\r\n    };\r\n    var companies = {\r\n        label: 'Empresa',\r\n        options: companiesToSelect\r\n    };\r\n    var optionsCompanies = companiesToSelect.map(function (item) {\r\n        return {\r\n            label: item.name,\r\n            value: item.id\r\n        };\r\n    });\r\n    var statusSelcts = {\r\n        label: 'Status Empresa',\r\n        options: statusSelect\r\n    };\r\n    var support = {\r\n        label: 'Técnico',\r\n        options: supportOpt\r\n    };\r\n    var modalitySelect = {\r\n        label: 'Modalidade',\r\n        options: modalityOptions\r\n    };\r\n    var history = useHistory();\r\n    var _m = useState(false), modalIsOpenCompany = _m[0], setIsOpenCompany = _m[1];\r\n    var _o = useState(false), saveBtn = _o[0], setSaveBtn = _o[1];\r\n    function handleOpenModalCompany() {\r\n        setIsOpenCompany(true);\r\n    }\r\n    function handlecloseModalCompany() {\r\n        setIsOpenCompany(false);\r\n    }\r\n    var compnaySchema = Yup.object().shape({\r\n        name: Yup.string()\r\n            .required('O campo Nome é obrigatório.')\r\n            .max(50, 'O campo Nome deve conter no máximo 50 caracteres.'),\r\n        helper: Yup.string()\r\n            .required('O campo Técnico é obrigatório.'),\r\n        wpsId: Yup.number()\r\n            .required('O campo Wps Id é obrigatório.')\r\n            .moreThan(0, 'O campo Wps Id deve ser maior que zero.')\r\n            .max(2147483647, 'O valor máximo para o campo Wps Id é 2147483647.'),\r\n        cpf: Yup.string()\r\n            .nullable()\r\n            .matches(/^[0-9]+$/, 'O campo CPF deve conter apenas números.')\r\n            .min(11, 'O campo CPF deve conter 11 dígitos.')\r\n            .max(11, 'O campo CPF deve conter 11 dígitos.'),\r\n        cnpj: Yup.string()\r\n            .nullable()\r\n            .matches(/^[0-9]+$/, 'O campo CNPJ deve conter apenas números.')\r\n            .min(14, 'O campo CNPJ deve conter 14 dígitos.')\r\n            .max(14, 'O campo CNPJ deve conter 14 dígitos.'),\r\n    });\r\n    var formatDate = function (dateString) {\r\n        if (!dateString)\r\n            return null;\r\n        return dateString.split(\"T\")[0]; // Pega apenas a parte antes do \"T\"\r\n    };\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            name: companyInfo === null || companyInfo === void 0 ? void 0 : companyInfo.name,\r\n            helper: companyInfo === null || companyInfo === void 0 ? void 0 : companyInfo.helper.id,\r\n            status: companyInfo === null || companyInfo === void 0 ? void 0 : companyInfo.status.id,\r\n            wpsId: companyInfo === null || companyInfo === void 0 ? void 0 : companyInfo.wpsId,\r\n            cpf: companyInfo === null || companyInfo === void 0 ? void 0 : companyInfo.cpf,\r\n            cnpj: companyInfo === null || companyInfo === void 0 ? void 0 : companyInfo.cnpj,\r\n            isImplantation: companyInfo === null || companyInfo === void 0 ? void 0 : companyInfo.isImplantation,\r\n            registrationDate: formatDate(companyInfo === null || companyInfo === void 0 ? void 0 : companyInfo.registrationDate),\r\n            modality: (_a = companyInfo === null || companyInfo === void 0 ? void 0 : companyInfo.modality) === null || _a === void 0 ? void 0 : _a.id\r\n        },\r\n        enableReinitialize: true,\r\n        validationSchema: compnaySchema,\r\n        onSubmit: function (values) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var _a;\r\n            return __generator(this, function (_b) {\r\n                values.modality = ((_a = values.modality) === null || _a === void 0 ? void 0 : _a.toString()) != \"\" ? values.modality : undefined;\r\n                values.registrationDate = values.registrationDate != \"\" ? values.registrationDate : null;\r\n                api.put(\"/companies/\" + (companyInfo === null || companyInfo === void 0 ? void 0 : companyInfo.id), values, config).then(function (response) {\r\n                }).then(function () { return setSaveBtn(false); });\r\n                return [2 /*return*/];\r\n            });\r\n        }); }\r\n    });\r\n    var customStyles = {\r\n        control: function (provided) { return (__assign(__assign({}, provided), { minHeight: \"20px\", boxShadow: 'none', fontSize: \"14px !important\" })); },\r\n        input: function (provided) { return (__assign(__assign({}, provided), { padding: \"0px\" })); },\r\n        path: function (provided) { return (__assign(__assign({}, provided), { fill: \"black\" })); },\r\n        indicatorsContainer: function (provided) { return (__assign(__assign({}, provided), { height: \"20px\" })); },\r\n        indicatorSeparator: function (provided) { return (__assign(__assign({}, provided), { height: \"0px\" })); },\r\n        dropdownIndicator: function (provided) { return (__assign(__assign({}, provided), { padding: \"2px\", color: \"black\" })); }\r\n    };\r\n    return (_jsxs(_Fragment, { children: [_jsxs(\"div\", __assign({ className: styles.container }, { children: [_jsxs(\"div\", __assign({ className: styles.divSelectCompany }, { children: [_jsx(\"label\", { children: \"Empresa:\" }, void 0), _jsx(Select, { styles: customStyles, placeholder: 'Selecione uma empresa', options: optionsCompanies, onChange: handleFindCompanyById, className: styles.selectCompany }, void 0), _jsx(\"div\", __assign({ className: '' }, { children: _jsx(FiPlus, { title: 'Nova Empresa', size: 16, className: 'cursor-pointer mt-1', onClick: handleOpenModalCompany }, void 0) }), void 0)] }), void 0), companyInfo &&\r\n                        _jsx(_Fragment, { children: _jsx(\"form\", __assign({ onChange: function () { return setSaveBtn(true); }, onSubmit: formik.handleSubmit }, { children: _jsxs(\"div\", __assign({ className: styles.gridCompanyInfo }, { children: [_jsxs(\"div\", __assign({ className: \"grid grid-cols-3 md:grid-cols-\" + 3 + \" lg:grid-cols-\" + 3 + \" justify-items-end\" }, { children: [_jsx(InputText, { disabled: true, onChange: formik.handleChange, name: 'id', label: 'ID', inicialValue: companyInfo.id || '' }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'name', label: 'Nome', inicialValue: formik.values.name || '' }, void 0), _jsx(InputSelect, { value: formik.values.status || '', name: 'status', disabled: (login === null || login === void 0 ? void 0 : login.role) !== 'Administrator', onChange: formik.handleChange, values: statusSelcts, valueMember: 'id', displayMember: 'name', firstOption: companyInfo.status.nome || '' }, void 0), _jsx(InputSelect, { value: formik.values.helper || '', name: 'helper', onChange: formik.handleChange, values: support, valueMember: 'id', displayMember: 'name', firstOption: companyInfo.helper.nome || '' }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'wpsId', label: 'Wps Id', inicialValue: formik.values.wpsId || '' }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'cpf', label: 'CPF', inicialValue: formik.values.cpf || '' }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'cnpj', label: 'CNPJ', inicialValue: formik.values.cnpj || '' }, void 0), _jsx(InputDate, { onChange: formik.handleChange, name: 'registrationDate', label: 'Data Cadastro', inicialValue: formik.values.registrationDate }, void 0), _jsxs(\"div\", __assign({ className: styles.containerCheckBoxInput }, { children: [_jsx(\"label\", __assign({ className: styles.labelImplantationa }, { children: \"Implanta\\u00E7\\u00E3o:\" }), void 0), _jsx(\"input\", { onChange: formik.handleChange, name: 'isImplantation', type: \"checkbox\", checked: formik.values.isImplantation }, void 0)] }), void 0), _jsx(\"div\", __assign({ className: styles.inputSelectModality }, { children: _jsx(InputSelect, { resize: true, value: formik.values.modality || '', name: 'modality', onChange: formik.handleChange, values: modalitySelect, valueMember: 'id', displayMember: 'name', firstOption: ((_b = companyInfo === null || companyInfo === void 0 ? void 0 : companyInfo.modality) === null || _b === void 0 ? void 0 : _b.nome) || '' }, void 0) }), void 0)] }), void 0), formik.errors.name && formik.touched.name && _jsx(\"i\", __assign({ className: 'w-full flex justify-center text-red-400' }, { children: formik.errors.name }), void 0), formik.errors.helper && formik.touched.helper && _jsx(\"i\", __assign({ className: 'w-full flex justify-center text-red-400' }, { children: formik.errors.helper }), void 0), formik.errors.wpsId && formik.touched.wpsId && _jsx(\"i\", __assign({ className: 'w-full flex justify-center text-red-400' }, { children: formik.errors.wpsId }), void 0), formik.errors.cpf && formik.touched.cpf && _jsx(\"i\", __assign({ className: 'w-full flex justify-center text-red-400' }, { children: formik.errors.cpf }), void 0), formik.errors.cnpj && formik.touched.cnpj && _jsx(\"i\", __assign({ className: 'w-full flex justify-center text-red-400' }, { children: formik.errors.cnpj }), void 0), saveBtn &&\r\n                                            _jsx(\"div\", __assign({ className: styles.saveButton }, { children: _jsx(Button, __assign({ type: 'submit' }, { children: \"Salvar\" }), void 0) }), void 0)] }), void 0) }), void 0) }, void 0), _jsx(TabContents, { contents: tabs }, void 0)] }), void 0), _jsx(ModalCompany, { setId: setId, setRefresh: setRefresh, modalIsOpenCompany: modalIsOpenCompany, handleOpenModalCompany: handleOpenModalCompany, handlecloseModalCompany: handlecloseModalCompany }, void 0)] }, void 0));\r\n};\r\nexport default Company;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useEffect, useState } from 'react';\r\nimport { BsSearch } from 'react-icons/bs';\r\nimport { MdAutorenew } from 'react-icons/md';\r\nimport api from '../../services/api';\r\nimport useAuth from '../../hooks/useAuth';\r\nimport useTitle from '../../hooks/useTitle';\r\nimport { FiDownload } from \"react-icons/fi\";\r\nimport { GiCancel, GiConfirmed } from 'react-icons/gi';\r\nimport { Table } from 'template/lib';\r\nimport styles from './styles.module.scss';\r\nimport apiUrl from '../../services/apiUrl';\r\nvar Licenses = function () {\r\n    var _a = useState([]), details = _a[0], setDetails = _a[1];\r\n    var _b = useState(1), pageDetails = _b[0], setPageDetails = _b[1];\r\n    var _c = useState(10), pageSizeDetails = _c[0], setPageSizeDetails = _c[1];\r\n    var _d = useState(false), hasNextDetails = _d[0], setHasNextDetails = _d[1];\r\n    var _e = useState(0), totalPagesDetails = _e[0], setTotalPagesDetails = _e[1];\r\n    var _f = useState(false), detailsTable = _f[0], setDetailsTable = _f[1];\r\n    var _g = useState(0), save = _g[0], setSave = _g[1];\r\n    var _h = useState(1), page = _h[0], setPage = _h[1];\r\n    var _j = useState(10), pageSize = _j[0], setPageSize = _j[1];\r\n    var _k = useState(false), hasNext = _k[0], setHasNext = _k[1];\r\n    var _l = useState(0), totalPages = _l[0], setTotalPages = _l[1];\r\n    var _m = useState([]), items = _m[0], setItems = _m[1];\r\n    var _o = useState(0), idLicense = _o[0], setIdLicense = _o[1];\r\n    var _p = useState(true), loading = _p[0], setLoading = _p[1];\r\n    var _q = useState(true), loadingDetails = _q[0], setLoadingDetails = _q[1];\r\n    var _r = useState(''), titleOfLicense = _r[0], setTitleOfLicense = _r[1];\r\n    var login = useAuth().login;\r\n    var setTitle = useTitle().setTitle;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        setTitle('Licenças');\r\n        setDetailsTable(false);\r\n        api.get(\"licenses/licensesByCompanyIdReadOnly?companyId=\" + (login === null || login === void 0 ? void 0 : login.companyId), config).then(function (response) {\r\n            setItems(response.data);\r\n        }).catch(function (err) { return console.log(err.response.status); }).then(function () { return setLoading(false); });\r\n    }, []);\r\n    var lineBtnsWithoutAssginToDetails = [\r\n        {\r\n            name: 'Resetar Licença',\r\n            icon: _jsx(MdAutorenew, { size: 16, className: 'text-sm' }, void 0),\r\n            fn: function (id) {\r\n                setSave(id);\r\n            }\r\n        }\r\n    ];\r\n    var lineBtnsWithoutAssginToDetailsSave = [\r\n        {\r\n            name: 'Confirmar',\r\n            icon: _jsx(GiConfirmed, { className: 'hover:text-green-500 text-green-700', size: 16 }, void 0),\r\n            id: save,\r\n            fn: function (id) {\r\n                api.patch(\"licenses/\" + idLicense + \"/licenseRenovations/\" + id + \"/reset\", '', config).then(function (response) { return console.log(response.data); }).then(function () { return setSave(0); }).then(function () {\r\n                    api.get(\"licenses/\" + idLicense + \"/licenseRenovations\", config).then(function (response) {\r\n                        setTitleOfLicense(response.data.renovationTitle);\r\n                        setDetails(response.data.renovations);\r\n                    });\r\n                });\r\n            }\r\n        },\r\n        {\r\n            name: 'Cancelar',\r\n            icon: _jsx(GiCancel, { className: 'hover:text-red-400 text-red-600', size: 16 }, void 0),\r\n            id: save,\r\n            fn: function (id) {\r\n                setSave(-1);\r\n            }\r\n        }\r\n    ];\r\n    var lineBtnsWithoutAssginTo = [\r\n        {\r\n            name: 'Detalhes',\r\n            icon: _jsx(BsSearch, { className: '' }, void 0),\r\n            fn: function (id) {\r\n                api.get(\"licenses/\" + id + \"/licenseRenovations\", config).then(function (response) {\r\n                    setIdLicense(id);\r\n                    setDetails(response.data.renovations);\r\n                    setTitleOfLicense(response.data.renovationTitle);\r\n                    setDetailsTable(true);\r\n                }).then(function () { return setLoadingDetails(false); });\r\n            }\r\n        },\r\n        {\r\n            name: 'Download Instalador',\r\n            icon: _jsx(FiDownload, { size: 16 }, void 0),\r\n            fn: function (id) {\r\n                window.open(apiUrl + \"licenses/\" + id + \"/download-installer\", \"_blank\");\r\n            },\r\n            hideWithCondition: true\r\n        }\r\n    ];\r\n    return (_jsx(_Fragment, { children: _jsxs(\"div\", __assign({ className: styles.container }, { children: [_jsx(\"div\", __assign({ className: \"\" + (detailsTable ? styles.fisrtContentBoxBreak : styles.fisrtContentBox) }, { children: _jsx(Table, { setSize: setPageSize, hasNext: hasNext, page: page, highLightLine: true, setPage: setPage, data: items, loading: loading, totalPAges: totalPages, lineButton: lineBtnsWithoutAssginTo, title: 'Licen\\u00E7as', columns: [\r\n                            { label: 'ID', key: 'id' },\r\n                            { label: 'Produto', key: 'product' },\r\n                            { label: 'Quantidade', key: 'quantity' },\r\n                        ] }, void 0) }), void 0), detailsTable &&\r\n                    _jsx(\"div\", { className: 'h-0.5 w-full bg-gray-200' }, void 0), _jsx(\"div\", __assign({ className: \"\" + (detailsTable && styles.detailsTable) }, { children: detailsTable &&\r\n                        _jsx(_Fragment, { children: _jsx(Table, { setSize: setPageSizeDetails, hasNext: hasNextDetails, page: pageDetails, setPage: setPageDetails, data: details, lineButtonForEach: lineBtnsWithoutAssginToDetailsSave, loading: loadingDetails, totalPAges: totalPagesDetails, lineButton: lineBtnsWithoutAssginToDetails, title: titleOfLicense, columns: [\r\n                                    { label: 'ID', key: 'id' },\r\n                                    { label: 'Data Renovação', key: 'dateRenovation' },\r\n                                    { label: 'Data Expiração', key: 'dateExpiration' },\r\n                                    { label: 'Número da Licença', key: 'licenseNumber' },\r\n                                    { label: 'Última Validação', key: 'dateLastValidation' },\r\n                                    { label: 'Detalhes', key: 'renovationDetails' },\r\n                                    { label: 'Usuário do Domínio', key: 'userDomain' },\r\n                                    { label: 'Versão Instalada', key: 'softwareLicence' }\r\n                                ] }, void 0) }, void 0) }), void 0)] }), void 0) }, void 0));\r\n};\r\nexport default Licenses;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useFormik } from 'formik';\r\nimport { useEffect } from 'react';\r\nimport { AiOutlineClose } from 'react-icons/ai';\r\nimport Modal from 'react-modal';\r\nimport { useHistory } from 'react-router-dom';\r\nimport useAuth from '../../../hooks/useAuth';\r\nimport api from '../../../services/api';\r\nimport * as Yup from 'yup';\r\nimport styles from './styles.module.scss';\r\nimport { Button, InputText, InputDate } from 'template/lib';\r\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\r\nModal.setAppElement('#root');\r\nvar ModalLibrary = function (props) {\r\n    var history = useHistory();\r\n    var _a = useAuth(), login = _a.login, handleLogout = _a.handleLogout;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n    }, []);\r\n    useEffect(function () {\r\n        if (props.modalIsOpenLibrary) {\r\n            resetFormValues();\r\n        }\r\n    }, [props.modalIsOpenLibrary]);\r\n    var librarySchema = Yup.object().shape({\r\n        name: Yup.string()\r\n            .min(3, 'Por favor, informe pelo menos 3 caracteres.')\r\n            .required('Por favor, informe um nome.'),\r\n        compilationDate: Yup.date()\r\n            .required('Por favor, informe uma data de compilação.')\r\n    });\r\n    function resetFormValues() {\r\n        formik.resetForm({\r\n            values: {\r\n                name: '',\r\n                companyId: login === null || login === void 0 ? void 0 : login.companyId,\r\n                compilationDate: '',\r\n                firstLibrary: false,\r\n                ftpHost: '',\r\n                ftpPort: 0,\r\n                ftpUser: '',\r\n                ftpPassword: '',\r\n                ftpRemoteDirectory: '',\r\n                ftpEnableSSL: false\r\n            },\r\n        });\r\n    }\r\n    var formik = useFormik({\r\n        enableReinitialize: true,\r\n        initialValues: {\r\n            name: '',\r\n            companyId: login === null || login === void 0 ? void 0 : login.companyId,\r\n            compilationDate: '',\r\n            firstLibrary: false,\r\n            ftpHost: '',\r\n            ftpPort: 0,\r\n            ftpUser: '',\r\n            ftpPassword: '',\r\n            ftpRemoteDirectory: '',\r\n            ftpEnableSSL: false\r\n        },\r\n        validationSchema: librarySchema,\r\n        onSubmit: function (values, actions) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        _a.trys.push([0, 2, , 3]);\r\n                        return [4 /*yield*/, api.post('libraries', values, config).then(function () {\r\n                                resetFormValues();\r\n                                props.setRefresh(!props.refresh);\r\n                                props.handleCloseModalLibrary();\r\n                            })];\r\n                    case 1:\r\n                        _a.sent();\r\n                        return [3 /*break*/, 3];\r\n                    case 2:\r\n                        err_1 = _a.sent();\r\n                        if (!login || Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n                            handleLogout();\r\n                            history.push('/');\r\n                        }\r\n                        console.log(err_1);\r\n                        alert('erro');\r\n                        return [3 /*break*/, 3];\r\n                    case 3: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); },\r\n    });\r\n    var columns = 1;\r\n    return (_jsx(\"div\", { children: _jsx(Modal, __assign({ isOpen: props.modalIsOpenLibrary, shouldCloseOnOverlayClick: false, onRequestClose: props.handleCloseModalLibrary, overlayClassName: 'react-modal-overly', className: 'react-modal-content', contentLabel: \"Example Modal\" }, { children: _jsxs(\"div\", __assign({ className: '' }, { children: [_jsxs(\"div\", __assign({ className: styles.header }, { children: [_jsx(\"div\", {}, void 0), _jsx(\"h2\", __assign({ className: ' font-semibold border-b-2 text-lg' }, { children: \"Nova Biblioteca\" }), void 0), _jsx(AiOutlineClose, { title: 'Fechar', className: 'cursor-pointer text-sm', onClick: props.handleCloseModalLibrary }, void 0)] }), void 0), _jsx(\"div\", __assign({ className: styles.content }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, className: 'mx-4 my-4' }, { children: [_jsx(\"div\", __assign({ className: 'grid justify-items-start' }, { children: _jsxs(\"div\", __assign({ className: \"grid grid-cols-1 md:grid-cols-\" + columns + \" lg:grid-cols-\" + columns + \" my-2 justify-items-end\" }, { children: [_jsx(InputText, { onChange: formik.handleChange, name: 'name', label: 'Nome', inicialValue: formik.values.name }, void 0), formik.errors.name && formik.touched.name && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.name }), void 0), _jsx(InputDate, { onChange: formik.handleChange, name: 'compilationDate', label: 'Data de compila\\u00E7\\u00E3o', inicialValue: formik.values.compilationDate }, void 0), formik.errors.compilationDate && formik.touched.compilationDate && _jsx(\"i\", __assign({ className: styles.formikErrors }, { children: formik.errors.compilationDate }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'ftpHost', label: 'Host', inicialValue: formik.values.ftpHost }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'ftpPort', label: 'Porta', inicialValue: formik.values.ftpPort }, void 0), _jsxs(\"div\", __assign({ className: styles.containerCheckBoxInput }, { children: [_jsx(\"label\", __assign({ className: styles.labelEnableSSL }, { children: \"Habilita SSL:\" }), void 0), _jsx(\"input\", { onChange: formik.handleChange, name: 'ftpEnableSSL', type: \"checkbox\", checked: formik.values.ftpEnableSSL }, void 0)] }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'ftpUser', label: 'Usu\\u00E1rio', inicialValue: formik.values.ftpUser }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'ftpPassword', label: 'Senha', inicialValue: formik.values.ftpPassword, isPassword: true }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'ftpRemoteDirectory', label: 'Diret\\u00F3rio Remoto', inicialValue: formik.values.ftpRemoteDirectory }, void 0)] }), void 0) }), void 0), _jsx(\"div\", __assign({ className: styles.flexButton }, { children: _jsx(Button, __assign({ type: 'submit', className: '' }, { children: \"Salvar\" }), void 0) }), void 0)] }), void 0) }), void 0)] }), void 0) }), void 0) }, void 0));\r\n};\r\nexport default ModalLibrary;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useFormik } from 'formik';\r\nimport { useEffect } from 'react';\r\nimport { useState } from 'react';\r\nimport { AiOutlineClose } from 'react-icons/ai';\r\nimport Modal from 'react-modal';\r\nimport { useHistory } from 'react-router-dom';\r\nimport useAuth from '../../../hooks/useAuth';\r\nimport api from '../../../services/api';\r\nimport * as Yup from 'yup';\r\nimport styles from './styles.module.scss';\r\nimport { Button, InputText } from 'template/lib';\r\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\r\nModal.setAppElement('#root');\r\nvar ModalLibraryFTP = function (props) {\r\n    var history = useHistory();\r\n    var _a = useAuth(), login = _a.login, handleLogout = _a.handleLogout;\r\n    var _b = useState(false), loadFtpFromApi = _b[0], setLoadFtpFromApi = _b[1];\r\n    var _c = useState(''), ftpHost = _c[0], setFtpHost = _c[1];\r\n    var _d = useState(0), ftpPort = _d[0], setFtpPort = _d[1];\r\n    var _e = useState(''), ftpRemoteDirectory = _e[0], setFtpRemoteDirectory = _e[1];\r\n    var _f = useState(''), ftpUser = _f[0], setFtpUser = _f[1];\r\n    var _g = useState(false), ftpEnableSSL = _g[0], setFtpEnableSSL = _g[1];\r\n    var _h = useState(true), passwordInvisible = _h[0], setPasswordInvisible = _h[1];\r\n    var _j = useState(false), isNew = _j[0], setIsNew = _j[1];\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n    }, []);\r\n    useEffect(function () {\r\n        if (props.modalIsOpenLibraryFTP) {\r\n            api.get(\"libraries/\" + props.libraryId + \"/get-ftp\", config)\r\n                .then(function (response) {\r\n                var _a, _b, _c, _d, _e;\r\n                if (response.data.ftpHost == null || response.data.ftpHost == undefined || response.data.ftpHost == '') {\r\n                    setPasswordInvisible(false);\r\n                    setIsNew(true);\r\n                }\r\n                setFtpHost((_a = response.data.ftpHost) !== null && _a !== void 0 ? _a : '');\r\n                setFtpPort((_b = response.data.ftpPort) !== null && _b !== void 0 ? _b : 0);\r\n                setFtpUser((_c = response.data.ftpUser) !== null && _c !== void 0 ? _c : '');\r\n                setFtpRemoteDirectory((_d = response.data.ftpRemoteDirectory) !== null && _d !== void 0 ? _d : '');\r\n                setFtpEnableSSL((_e = response.data.ftpEnableSSL) !== null && _e !== void 0 ? _e : false);\r\n                setLoadFtpFromApi(true);\r\n            });\r\n        }\r\n    }, [props.libraryId, props.modalIsOpenLibraryFTP]);\r\n    useEffect(function () {\r\n        if (props.modalIsOpenLibraryFTP == false) {\r\n            resetFormValues();\r\n            setPasswordInvisible(true);\r\n            setIsNew(false);\r\n        }\r\n    }, [props.modalIsOpenLibraryFTP]);\r\n    var libraryFtpSchema = Yup.object().shape({\r\n        ftpHost: Yup.string()\r\n            .required('Por favor, informe um host.'),\r\n        ftpPort: Yup.number()\r\n            .min(1, 'Por favor, informe uma porta maior que 0.')\r\n            .required('Por favor, informe uma porta.')\r\n    });\r\n    function resetFormValues() {\r\n        formik.resetForm({\r\n            values: {\r\n                ftpHost: '',\r\n                ftpPort: 0,\r\n                ftpUser: '',\r\n                ftpChangePassword: false,\r\n                ftpPassword: '',\r\n                ftpRemoteDirectory: '',\r\n                ftpEnableSSL: false\r\n            },\r\n        });\r\n    }\r\n    var formik = useFormik({\r\n        enableReinitialize: true,\r\n        initialValues: {\r\n            ftpHost: ftpHost,\r\n            ftpPort: ftpPort,\r\n            ftpUser: ftpUser,\r\n            ftpChangePassword: isNew,\r\n            ftpPassword: '',\r\n            ftpRemoteDirectory: ftpRemoteDirectory,\r\n            ftpEnableSSL: ftpEnableSSL\r\n        },\r\n        validationSchema: libraryFtpSchema,\r\n        onSubmit: function (values, actions) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        _a.trys.push([0, 2, , 3]);\r\n                        return [4 /*yield*/, api.patch(\"libraries/\" + props.libraryId + \"/update-ftp\", values, config).then(function () {\r\n                                resetFormValues();\r\n                                props.handleCloseModalLibraryFTP();\r\n                            })];\r\n                    case 1:\r\n                        _a.sent();\r\n                        return [3 /*break*/, 3];\r\n                    case 2:\r\n                        err_1 = _a.sent();\r\n                        if (!login || Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n                            handleLogout();\r\n                            history.push('/');\r\n                        }\r\n                        console.log(err_1);\r\n                        alert('erro');\r\n                        return [3 /*break*/, 3];\r\n                    case 3: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); },\r\n    });\r\n    var handleCheckBoxChange = function (event) {\r\n        setPasswordInvisible(!event.target.checked);\r\n        formik.handleChange(event);\r\n    };\r\n    var columns = 1;\r\n    return (_jsx(\"div\", { children: (loadFtpFromApi) ?\r\n            _jsx(Modal, __assign({ isOpen: props.modalIsOpenLibraryFTP, shouldCloseOnOverlayClick: false, onRequestClose: props.handleCloseModalLibraryFTP, overlayClassName: 'react-modal-overly', className: 'react-modal-content', contentLabel: \"Example Modal\" }, { children: _jsxs(\"div\", __assign({ className: '' }, { children: [_jsxs(\"div\", __assign({ className: styles.header }, { children: [_jsx(\"div\", {}, void 0), _jsx(\"h2\", __assign({ className: ' font-semibold border-b-2 text-lg' }, { children: \"Informa\\u00E7\\u00F5es FTP\" }), void 0), _jsx(AiOutlineClose, { title: 'Fechar', className: 'cursor-pointer text-sm', onClick: props.handleCloseModalLibraryFTP }, void 0)] }), void 0), _jsx(\"div\", __assign({ className: styles.content }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, className: 'mx-4 my-4' }, { children: [_jsx(\"div\", __assign({ className: 'grid justify-items-start' }, { children: _jsxs(\"div\", __assign({ className: \"grid grid-cols-1 md:grid-cols-\" + columns + \" lg:grid-cols-\" + columns + \" my-2 justify-items-end\" }, { children: [_jsx(InputText, { onChange: formik.handleChange, name: 'ftpHost', label: 'Host', inicialValue: formik.values.ftpHost }, void 0), formik.errors.ftpHost && formik.touched.ftpHost && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.ftpHost }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'ftpPort', label: 'Porta', inicialValue: formik.values.ftpPort }, void 0), formik.errors.ftpPort && formik.touched.ftpPort && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.ftpPort }), void 0), _jsxs(\"div\", __assign({ className: styles.containerCheckBoxInput }, { children: [_jsx(\"label\", __assign({ className: styles.labelEnableSSL }, { children: \"Habilita SSL:\" }), void 0), _jsx(\"input\", { onChange: formik.handleChange, name: 'ftpEnableSSL', type: \"checkbox\", checked: formik.values.ftpEnableSSL }, void 0)] }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'ftpRemoteDirectory', label: 'Diret\\u00F3rio Remoto', inicialValue: formik.values.ftpRemoteDirectory }, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'ftpUser', label: 'Usu\\u00E1rio', inicialValue: formik.values.ftpUser }, void 0), (!isNew) ? _jsxs(\"div\", __assign({ className: styles.containerCheckBoxInput }, { children: [_jsx(\"label\", __assign({ className: styles.labelChangePassword }, { children: \"Alterar senha:\" }), void 0), _jsx(\"input\", { onChange: handleCheckBoxChange, name: 'ftpChangePassword', type: \"checkbox\" }, void 0)] }), void 0)\r\n                                                    : _jsx(\"div\", {}, void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'ftpPassword', label: 'Senha', inicialValue: formik.values.ftpPassword, isPassword: true, invisible: passwordInvisible }, void 0)] }), void 0) }), void 0), _jsx(\"div\", __assign({ className: styles.flexButton }, { children: _jsx(Button, __assign({ type: 'submit', className: '' }, { children: \"Salvar\" }), void 0) }), void 0)] }), void 0) }), void 0)] }), void 0) }), void 0)\r\n            : _jsx(\"div\", {}, void 0) }, void 0));\r\n};\r\nexport default ModalLibraryFTP;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useHistory } from 'react-router-dom';\r\nimport { useEffect, useState } from 'react';\r\nimport { Table } from 'template/lib';\r\nimport useAuth from '../../hooks/useAuth';\r\nimport useTitle from '../../hooks/useTitle';\r\nimport api from '../../services/api';\r\nimport ModalLibrary from \"../Modals/ModalLibrary\";\r\nimport ModalLibraryFTP from \"../Modals/ModalLibraryFTP\";\r\nimport { FiDownload, FiEdit3, FiPlus } from \"react-icons/fi\";\r\nimport styles from './styles.module.scss';\r\nimport apiUrl from '../../services/apiUrl';\r\nvar Libraries = function () {\r\n    var _a = useState(0), idToChange = _a[0], setIdToChange = _a[1];\r\n    var _b = useState(0), idLibrary = _b[0], setIdLibrary = _b[1];\r\n    var _c = useState([]), libraryState = _c[0], setLibraryState = _c[1];\r\n    var _d = useAuth(), login = _d.login, handleLogout = _d.handleLogout;\r\n    var _e = useState([]), items = _e[0], setItems = _e[1];\r\n    var _f = useState(1), page = _f[0], setPage = _f[1];\r\n    var _g = useState(0), totalPages = _g[0], setTotalPages = _g[1];\r\n    var _h = useState(true), loading = _h[0], setLoading = _h[1];\r\n    var _j = useState(10), pageSize = _j[0], setPageSize = _j[1];\r\n    var _k = useState(false), refresh = _k[0], setRefresh = _k[1];\r\n    var _l = useState(false), hasNext = _l[0], setHasNext = _l[1];\r\n    var setTitle = useTitle().setTitle;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    var history = useHistory();\r\n    useEffect(function () {\r\n        setTitle('Bibliotecas');\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        api.get(\"/libraries/get-by-company-total-pages/\" + (login === null || login === void 0 ? void 0 : login.companyId) + \"?pageSize=\" + pageSize, config)\r\n            .then(function (response) {\r\n            setTotalPages(response.data);\r\n            if (response.data > page) {\r\n                setHasNext(true);\r\n            }\r\n            else {\r\n                setHasNext(false);\r\n            }\r\n        });\r\n        api.get(\"/libraries/get-by-company/\" + (login === null || login === void 0 ? void 0 : login.companyId) + \"?page=\" + page + \"&pageSize=\" + pageSize, config)\r\n            .then(function (response) {\r\n            try {\r\n                setItems(response.data);\r\n            }\r\n            catch (e) {\r\n                console.log(response.data);\r\n            }\r\n        }).then(function () { return setLoading(false); });\r\n    }, [refresh, page, pageSize]);\r\n    useEffect(function () {\r\n        if (idToChange == 0) {\r\n            return;\r\n        }\r\n        api.put(\"/libraries/\" + idToChange, libraryState, config).then(function () {\r\n            setRefresh(!refresh);\r\n        });\r\n    }, [libraryState, idToChange]);\r\n    var _m = useState(false), modalIsOpenLibrary = _m[0], setModalIsOpenLibrary = _m[1];\r\n    function handleOpenModalLibrary() {\r\n        setModalIsOpenLibrary(true);\r\n    }\r\n    function handleCloseModalLibrary() {\r\n        setModalIsOpenLibrary(false);\r\n    }\r\n    var _o = useState(false), modalIsOpenLibraryFTP = _o[0], setModalIsOpenLibraryFTP = _o[1];\r\n    function handleOpenModalLibraryFTP() {\r\n        setModalIsOpenLibraryFTP(true);\r\n    }\r\n    function handleCloseModalLibraryFTP() {\r\n        setModalIsOpenLibraryFTP(false);\r\n    }\r\n    var lineBtnLibraryFTP = [\r\n        {\r\n            fn: function (id) {\r\n                setIdLibrary(id);\r\n                handleOpenModalLibraryFTP();\r\n            },\r\n            icon: _jsx(FiEdit3, { size: 16 }, void 0),\r\n            name: 'Informações FTP'\r\n        },\r\n        {\r\n            fn: function (id) {\r\n                window.open(apiUrl + \"libraries/\" + id + \"/download-library-installer\", \"_blank\");\r\n            },\r\n            icon: _jsx(FiDownload, { size: 16 }, void 0),\r\n            name: 'Download Instalador Biblioteca'\r\n        }\r\n    ];\r\n    var menuBtn = [\r\n        {\r\n            fn: function () {\r\n                handleOpenModalLibrary();\r\n                setRefresh(!refresh);\r\n            },\r\n            icon: _jsx(FiPlus, { size: 16 }, void 0),\r\n            id: 1,\r\n            title: 'Nova Biblioteca'\r\n        }\r\n    ];\r\n    return (_jsxs(_Fragment, { children: [_jsx(\"div\", __assign({ className: styles.container }, { children: _jsx(Table, { setSize: setPageSize, size: pageSize, hasNext: hasNext, page: page, setPage: setPage, data: items, setData: setItems, changeExistentContent: setLibraryState, totalPAges: totalPages, loading: loading, title: 'Bibliotecas', setIdToChange: setIdToChange, refresh: setRefresh, editable: true, headerButtons: menuBtn, lineButton: lineBtnLibraryFTP, columns: [\r\n                        { label: 'ID', key: 'id' },\r\n                        { label: 'Nome', key: 'name' },\r\n                        { label: 'Data de Compilação', key: 'dateCompilation' },\r\n                        { label: 'Principal', key: 'select_main' },\r\n                    ] }, void 0) }), void 0), _jsx(ModalLibrary, { refresh: refresh, setRefresh: setRefresh, modalIsOpenLibrary: modalIsOpenLibrary, handleOpenModalLibrary: handleOpenModalLibrary, handleCloseModalLibrary: handleCloseModalLibrary }, void 0), _jsx(ModalLibraryFTP, { libraryId: idLibrary, modalIsOpenLibraryFTP: modalIsOpenLibraryFTP, handleOpenModalLibraryFTP: handleOpenModalLibraryFTP, handleCloseModalLibraryFTP: handleCloseModalLibraryFTP }, void 0)] }, void 0));\r\n};\r\nexport default Libraries;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useFormik } from 'formik';\r\nimport { useEffect } from 'react';\r\nimport { AiOutlineClose } from 'react-icons/ai';\r\nimport Modal from 'react-modal';\r\nimport { useHistory } from 'react-router-dom';\r\nimport useAuth from '../../../hooks/useAuth';\r\nimport api from '../../../services/api';\r\nimport * as Yup from 'yup';\r\nimport styles from './styles.module.scss';\r\nimport { Button, InputText } from 'template/lib';\r\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\r\nModal.setAppElement('#root');\r\nvar ModalBuyEnvelopes = function (props) {\r\n    var history = useHistory();\r\n    var _a = useAuth(), login = _a.login, handleLogout = _a.handleLogout;\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n    }, []);\r\n    useEffect(function () {\r\n        if (props.modalIsOpenBuyEnvelopes) {\r\n            resetFormValues();\r\n        }\r\n    }, [props.modalIsOpenBuyEnvelopes]);\r\n    var buyEnvelopesSchema = Yup.object().shape({\r\n        quantity: Yup.number()\r\n            .min(1, 'Por favor, informe uma quantidade maior que 0.')\r\n            .required('Por favor, informe uma quantidade.')\r\n    });\r\n    function resetFormValues() {\r\n        formik.resetForm({\r\n            values: {\r\n                companyId: login === null || login === void 0 ? void 0 : login.companyId,\r\n                quantity: ''\r\n            },\r\n        });\r\n    }\r\n    var formik = useFormik({\r\n        enableReinitialize: true,\r\n        initialValues: {\r\n            companyId: login === null || login === void 0 ? void 0 : login.companyId,\r\n            quantity: ''\r\n        },\r\n        validationSchema: buyEnvelopesSchema,\r\n        onSubmit: function (values, actions) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        _a.trys.push([0, 2, , 3]);\r\n                        return [4 /*yield*/, api.post('/envelopes-management/buy', values, config).then(function () {\r\n                                resetFormValues();\r\n                                props.setRefresh(!props.refresh);\r\n                                props.handleCloseModalBuyEnvelopes();\r\n                            })];\r\n                    case 1:\r\n                        _a.sent();\r\n                        return [3 /*break*/, 3];\r\n                    case 2:\r\n                        err_1 = _a.sent();\r\n                        if (!login || Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n                            handleLogout();\r\n                            history.push('/');\r\n                        }\r\n                        console.log(err_1);\r\n                        alert('erro');\r\n                        return [3 /*break*/, 3];\r\n                    case 3: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); },\r\n    });\r\n    var columns = 1;\r\n    return (_jsx(\"div\", { children: _jsx(Modal, __assign({ isOpen: props.modalIsOpenBuyEnvelopes, shouldCloseOnOverlayClick: false, onRequestClose: props.handleCloseModalBuyEnvelopes, overlayClassName: 'react-modal-overly', className: 'react-modal-content', contentLabel: \"Example Modal\" }, { children: _jsxs(\"div\", __assign({ className: '' }, { children: [_jsxs(\"div\", __assign({ className: styles.header }, { children: [_jsx(\"div\", {}, void 0), _jsx(\"h2\", __assign({ className: ' font-semibold border-b-2 text-lg' }, { children: \"Comprar Envelopes\" }), void 0), _jsx(AiOutlineClose, { title: 'Fechar', className: 'cursor-pointer text-sm', onClick: props.handleCloseModalBuyEnvelopes }, void 0)] }), void 0), _jsx(\"div\", __assign({ className: styles.content }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, className: 'mx-4 my-4' }, { children: [_jsx(\"div\", __assign({ className: 'grid justify-items-start' }, { children: _jsxs(\"div\", __assign({ className: \"grid grid-cols-1 md:grid-cols-\" + columns + \" lg:grid-cols-\" + columns + \" my-2 justify-items-end\" }, { children: [formik.errors.quantity && formik.touched.quantity && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.quantity }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'quantity', label: 'Quantidade', inicialValue: formik.values.quantity }, void 0)] }), void 0) }), void 0), _jsx(\"div\", __assign({ className: styles.flexButton }, { children: _jsx(Button, __assign({ type: 'submit', className: '' }, { children: \"Salvar\" }), void 0) }), void 0)] }), void 0) }), void 0), _jsx(\"span\", __assign({ style: { fontSize: '12.5px' } }, { children: \"**Antes de comprar, \\u00E9 necess\\u00E1rio j\\u00E1 ter adquirido os envelopes com a Docusign**\" }), void 0)] }), void 0) }), void 0) }, void 0));\r\n};\r\nexport default ModalBuyEnvelopes;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useFormik } from 'formik';\r\nimport { useEffect } from 'react';\r\nimport { useState } from 'react';\r\nimport { AiOutlineClose } from 'react-icons/ai';\r\nimport Modal from 'react-modal';\r\nimport { useHistory } from 'react-router-dom';\r\nimport useAuth from '../../../hooks/useAuth';\r\nimport api from '../../../services/api';\r\nimport * as Yup from 'yup';\r\nimport styles from './styles.module.scss';\r\nimport { Alert, Button, InputText, InputSelect } from 'template/lib';\r\n// Make sure to bind modal to your appElement (https://reactcommunity.org/react-modal/accessibility/)\r\nModal.setAppElement('#root');\r\nvar ModalTransferEnvelopes = function (props) {\r\n    var history = useHistory();\r\n    var _a = useAuth(), login = _a.login, handleLogout = _a.handleLogout;\r\n    var _b = useState([]), companies = _b[0], setCompanies = _b[1];\r\n    var _c = useState(false), confirmationError = _c[0], setConfirmationError = _c[1];\r\n    var _d = useState(''), errMessage = _d[0], setErrorMessage = _d[1];\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    useEffect(function () {\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        api.get('companies/active-with-docusign-license', config).then(function (response) {\r\n            setCompanies(response.data);\r\n        });\r\n    }, []);\r\n    useEffect(function () {\r\n        if (props.isOpenModalTransferEnvelopes) {\r\n            resetFormValues();\r\n            setErrorMessage('');\r\n            setConfirmationError(false);\r\n        }\r\n    }, [props.isOpenModalTransferEnvelopes]);\r\n    var transferEnvelopesSchema = Yup.object().shape({\r\n        company: Yup.string()\r\n            .required('Por favor, informe uma empresa.'),\r\n        quantity: Yup.number()\r\n            .min(1, 'Por favor, informe uma quantidade maior que 0.')\r\n            .required('Por favor, informe uma quantidade.')\r\n    });\r\n    function resetFormValues() {\r\n        formik.resetForm({\r\n            values: {\r\n                user: login === null || login === void 0 ? void 0 : login.login,\r\n                company: '',\r\n                quantity: ''\r\n            },\r\n        });\r\n    }\r\n    var formik = useFormik({\r\n        enableReinitialize: true,\r\n        initialValues: {\r\n            user: login === null || login === void 0 ? void 0 : login.login,\r\n            company: '',\r\n            quantity: ''\r\n        },\r\n        validationSchema: transferEnvelopesSchema,\r\n        onSubmit: function (values, actions) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        _a.trys.push([0, 2, , 3]);\r\n                        return [4 /*yield*/, api.post('/envelopes-management/transfer', values, config).then(function () {\r\n                                resetFormValues();\r\n                                props.setRefresh(!props.refresh);\r\n                                props.handleCloseModalTransferEnvelopes();\r\n                            }).catch(function (err) {\r\n                                if (err.response.data.message) {\r\n                                    setErrorMessage(err.response.data.message);\r\n                                }\r\n                                else if (err.response.data.detail) {\r\n                                    setErrorMessage(err.response.data.detail);\r\n                                }\r\n                                setConfirmationError(true);\r\n                            })];\r\n                    case 1:\r\n                        _a.sent();\r\n                        return [3 /*break*/, 3];\r\n                    case 2:\r\n                        err_1 = _a.sent();\r\n                        if (!login || Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n                            handleLogout();\r\n                            history.push('/');\r\n                        }\r\n                        if (err_1.response.data.detail) {\r\n                            alert(err_1.response.data.detail);\r\n                        }\r\n                        return [3 /*break*/, 3];\r\n                    case 3: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); },\r\n    });\r\n    var columns = 1;\r\n    var selectCompanyValues = {\r\n        label: 'Empresa',\r\n        options: companies\r\n    };\r\n    return (_jsx(\"div\", { children: _jsx(Modal, __assign({ isOpen: props.isOpenModalTransferEnvelopes, shouldCloseOnOverlayClick: false, onRequestClose: props.handleCloseModalTransferEnvelopes, overlayClassName: 'react-modal-overly', className: 'react-modal-content', contentLabel: \"Example Modal\" }, { children: _jsxs(\"div\", __assign({ className: '' }, { children: [_jsxs(\"div\", __assign({ className: styles.header }, { children: [_jsx(\"div\", {}, void 0), _jsx(\"h2\", __assign({ className: ' font-semibold border-b-2 text-lg' }, { children: \"Transferir Envelopes\" }), void 0), _jsx(AiOutlineClose, { title: 'Fechar', className: 'cursor-pointer text-sm', onClick: props.handleCloseModalTransferEnvelopes }, void 0)] }), void 0), confirmationError ? (_jsx(\"div\", __assign({ className: styles.withError }, { children: _jsxs(Alert, { children: [_jsx(\"strong\", { children: \"Erro! \" }, void 0), errMessage] }, void 0) }), void 0)) : _jsx(\"div\", { className: styles.withOutError }, void 0), _jsx(\"div\", __assign({ className: styles.content }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, className: 'mx-4 my-4' }, { children: [_jsx(\"div\", __assign({ className: 'grid justify-items-start' }, { children: _jsxs(\"div\", __assign({ className: \"grid grid-cols-1 md:grid-cols-\" + columns + \" lg:grid-cols-\" + columns + \" my-2 justify-items-end\" }, { children: [formik.errors.quantity && formik.touched.quantity && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.quantity }), void 0), _jsx(InputText, { onChange: formik.handleChange, name: 'quantity', label: 'Quantidade', inicialValue: formik.values.quantity }, void 0), formik.errors.company && formik.touched.company && _jsx(\"i\", __assign({ className: 'text-red-400 mr-5' }, { children: formik.errors.company }), void 0), _jsx(InputSelect, { onChange: formik.handleChange, value: formik.values.company, name: 'company', values: selectCompanyValues, valueMember: 'id', displayMember: 'name', firstOption: 'Selecione uma empresa' }, void 0)] }), void 0) }), void 0), _jsx(\"div\", __assign({ className: styles.flexButton }, { children: _jsx(Button, __assign({ type: 'submit', className: '' }, { children: \"Salvar\" }), void 0) }), void 0)] }), void 0) }), void 0)] }), void 0) }), void 0) }, void 0));\r\n};\r\nexport default ModalTransferEnvelopes;\r\n","var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\nvar __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport LogoImg from '../../assets/images/logo_cabecalho.png'; // PRODUÇÃO\r\n//import LogoImg from '../../assets/images/logo_cabecalho_teste.png' // TODO: TESTE\r\nimport { Link } from 'react-router-dom';\r\nimport { useFormik } from 'formik';\r\nimport api from '../../services/api';\r\nimport { useState } from 'react';\r\nimport { Alert } from 'template/lib';\r\nimport { RiArrowGoBackFill } from 'react-icons/ri';\r\nimport { css } from \"@emotion/react\";\r\nimport ClipLoader from \"react-spinners/ClipLoader\";\r\nimport styles from './styles.module.scss';\r\nvar override = css(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n  display: block;\\n  margin: 0 auto;\\n  border-color: #2f2f2f;\\n\"], [\"\\n  display: block;\\n  margin: 0 auto;\\n  border-color: #2f2f2f;\\n\"])));\r\nvar Register = function () {\r\n    var _a = useState(false), loading = _a[0], setLoading = _a[1];\r\n    var _b = useState(false), signInError = _b[0], setSignInError = _b[1];\r\n    var _c = useState(false), signInSuccess = _c[0], setSignInSuccess = _c[1];\r\n    var _d = useState('teste'), errMessage = _d[0], setErrorMessage = _d[1];\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            login: ''\r\n        },\r\n        onSubmit: function (values) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var err_1;\r\n            return __generator(this, function (_a) {\r\n                switch (_a.label) {\r\n                    case 0:\r\n                        setLoading(true);\r\n                        _a.label = 1;\r\n                    case 1:\r\n                        _a.trys.push([1, 3, 4, 5]);\r\n                        return [4 /*yield*/, api.patch(\"auth/recoveryPassword\", values)];\r\n                    case 2:\r\n                        _a.sent();\r\n                        setSignInSuccess(true);\r\n                        return [3 /*break*/, 5];\r\n                    case 3:\r\n                        err_1 = _a.sent();\r\n                        setErrorMessage(err_1.response.data.message);\r\n                        setSignInError(true);\r\n                        return [3 /*break*/, 5];\r\n                    case 4:\r\n                        setLoading(false);\r\n                        return [7 /*endfinally*/];\r\n                    case 5: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); }\r\n    });\r\n    return (_jsx(\"div\", __assign({ className: styles.body }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, onChange: function () { signInError && setSignInError(false); }, className: \"login-form\" }, { children: [_jsx(\"div\", __assign({ className: styles.logo }, { children: _jsx(\"img\", { className: styles.logoImg, src: LogoImg, alt: 'logoImage' }, void 0) }), void 0), _jsxs(\"div\", __assign({ className: styles.inputText }, { children: [_jsx(\"input\", { disabled: loading || signInSuccess, onChange: formik.handleChange, name: 'login', value: formik.values.login, type: \"text\", placeholder: \"Infome Seu Login/E-mail\" }, void 0), _jsx(\"p\", __assign({ className: styles.errorMessage }, { children: formik.errors.login && formik.touched.login && _jsx(\"i\", __assign({ className: 'text-red-400' }, { children: formik.errors.login }), void 0) }), void 0)] }), void 0), _jsx(\"button\", __assign({ disabled: loading || signInSuccess, className: \"\" + (loading || signInSuccess ? styles.loading : ''), type: 'submit' }, { children: !loading ? 'Enviar Solicitação' : _jsx(ClipLoader, { css: override, loading: loading, size: 16 }, void 0) }), void 0), signInError && _jsxs(Alert, { children: [_jsx(\"strong\", { children: \"Erro! \" }, void 0), errMessage] }, void 0), signInSuccess && _jsx(Alert, __assign({ success: true }, { children: \"Enviamos um e-mail para o endere\\u00E7o informado, verifique sua caixa.\" }), void 0), _jsx(\"div\", __assign({ className: 'my-2' }, { children: !signInSuccess && _jsxs(Link, __assign({ className: styles.message, to: '/requestuser' }, { children: [\" N\\u00E3o possui cadastro?\", _jsx(\"span\", __assign({ className: 'message' }, { children: \" Solicite aqui\" }), void 0), \" \"] }), void 0) }), void 0), _jsx(\"div\", __assign({ className: styles.linkBack }, { children: _jsx(Link, __assign({ to: '/' }, { children: _jsxs(\"div\", __assign({ className: '' }, { children: [_jsx(RiArrowGoBackFill, { className: 'mt-0.5', size: 14 }, void 0), \"Voltar\"] }), void 0) }), void 0) }), void 0)] }), void 0) }), void 0));\r\n};\r\nexport default Register;\r\nvar templateObject_1;\r\n","var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\nvar __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport LogoImg from '../../assets/images/logo_cabecalho.png'; // PRODU��O\r\n//import LogoImg from '../../assets/images/logo_cabecalho_teste.png' // TODO: TESTE\r\nimport { Link, useHistory, useParams } from 'react-router-dom';\r\nimport { useFormik } from 'formik';\r\nimport * as Yup from 'yup';\r\nimport api from '../../services/api';\r\nimport useAuth from '../../hooks/useAuth';\r\nimport { useEffect, useState } from 'react';\r\nimport { RiArrowGoBackFill } from 'react-icons/ri';\r\nimport { css } from \"@emotion/react\";\r\nimport ClipLoader from \"react-spinners/ClipLoader\";\r\nimport styles from './styles.module.scss';\r\nimport { Alert } from 'template/lib';\r\nvar override = css(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n  display: block;\\n  margin: 0 auto;\\n  border-color: #2f2f2f; \\n\"], [\"\\n  display: block;\\n  margin: 0 auto;\\n  border-color: #2f2f2f; \\n\"])));\r\nvar userSchema = Yup.object().shape({\r\n    newPassword: Yup.string()\r\n        .min(8, 'Por favor, informe uma senha com pelo menos 8 caracteres.')\r\n        .max(20, 'Por favor, informe uma senha com no m�ximo 20 caracteres.')\r\n        .required('Por favor, informe uma senha.'),\r\n    confirmPasswd: Yup.string()\r\n        .required('Por favor, confirme a senha')\r\n        .oneOf([Yup.ref('newPassword'), null], 'As senhas devem ser iguais.'),\r\n});\r\nvar ChangePassword = function () {\r\n    var params = useParams();\r\n    var id = params.id;\r\n    var code = params.code;\r\n    var history = useHistory();\r\n    var _a = useState(false), loading = _a[0], setLoading = _a[1];\r\n    var _b = useState(false), signInError = _b[0], setSignInError = _b[1];\r\n    var _c = useAuth(), handleSetLogin = _c.handleSetLogin, login = _c.login;\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            login: id,\r\n            verificationCode: code,\r\n            newPassword: '',\r\n            confirmPasswd: '',\r\n        }, validationSchema: userSchema,\r\n        onSubmit: function (values) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var response, _a;\r\n            return __generator(this, function (_b) {\r\n                switch (_b.label) {\r\n                    case 0:\r\n                        setLoading(true);\r\n                        _b.label = 1;\r\n                    case 1:\r\n                        _b.trys.push([1, 4, , 5]);\r\n                        return [4 /*yield*/, api.patch(\"auth/changePassword?login=\" + values.login + \"&verificationCode=\" + values.verificationCode, values)];\r\n                    case 2:\r\n                        response = _b.sent();\r\n                        return [4 /*yield*/, handleSetLogin(response.data.token)];\r\n                    case 3:\r\n                        _b.sent();\r\n                        setLoading(false);\r\n                        history.push('profile');\r\n                        return [3 /*break*/, 5];\r\n                    case 4:\r\n                        _a = _b.sent();\r\n                        setLoading(false);\r\n                        setSignInError(true);\r\n                        return [3 /*break*/, 5];\r\n                    case 5: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); }\r\n    });\r\n    useEffect(function () {\r\n        if (login) {\r\n            history.push('/profile');\r\n        }\r\n    }, [login]);\r\n    return (_jsx(\"div\", __assign({ className: styles.body }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit }, { children: [_jsx(\"div\", __assign({ className: styles.logo }, { children: _jsx(\"img\", { className: styles.logoImg, src: LogoImg, alt: 'logoImage' }, void 0) }), void 0), _jsxs(\"div\", __assign({ className: styles.inputText }, { children: [_jsx(\"input\", { disabled: loading, name: 'newPassword', value: formik.values.newPassword, onChange: formik.handleChange, type: \"password\", placeholder: \"Senha\" }, void 0), _jsxs(\"p\", __assign({ className: styles.errorMessage }, { children: [\" \", formik.errors.newPassword && formik.touched.newPassword && _jsx(\"i\", { children: formik.errors.newPassword }, void 0)] }), void 0)] }), void 0), _jsxs(\"div\", __assign({ className: styles.inputText }, { children: [_jsx(\"input\", { disabled: loading, name: 'confirmPasswd', value: formik.values.confirmPasswd, onChange: formik.handleChange, type: \"password\", placeholder: \"Confirma senha\" }, void 0), _jsxs(\"p\", __assign({ className: styles.errorMessage }, { children: [\" \", formik.errors.confirmPasswd && formik.touched.confirmPasswd && _jsx(\"i\", { children: formik.errors.confirmPasswd }, void 0)] }), void 0)] }), void 0), _jsx(\"button\", __assign({ disabled: loading, className: (loading ? styles.loading : '') + \" \", type: 'submit' }, { children: !loading ? 'Entrar' : _jsx(ClipLoader, { css: override, loading: loading, size: 16 }, void 0) }), void 0), signInError &&\r\n                    _jsxs(Alert, { children: [_jsx(\"strong\", { children: \"Erro!\" }, void 0), \" Por favor, revise seus dados.\"] }, void 0), _jsx(\"div\", __assign({ className: styles.linkBack }, { children: _jsx(Link, __assign({ to: '/' }, { children: _jsxs(\"div\", { children: [_jsx(RiArrowGoBackFill, { size: 14 }, void 0), \"Voltar\"] }, void 0) }), void 0) }), void 0)] }), void 0) }), void 0));\r\n};\r\nexport default ChangePassword;\r\nvar templateObject_1;\r\n","var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\nvar __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n};\r\nvar __generator = (this && this.__generator) || function (thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n};\r\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport LogoImg from '../../assets/images/logo_cabecalho.png'; // PRODUÇÃO\r\n//import LogoImg from '../../assets/images/logo_cabecalho_teste.png' // TODO: TESTE\r\nimport { Link } from 'react-router-dom';\r\nimport { useFormik } from 'formik';\r\nimport api from '../../services/api';\r\nimport { useState } from 'react';\r\nimport { Alert } from 'template/lib';\r\nimport { RiArrowGoBackFill } from 'react-icons/ri';\r\nimport { css } from \"@emotion/react\";\r\nimport ClipLoader from \"react-spinners/ClipLoader\";\r\nimport * as Yup from 'yup';\r\nimport styles from './styles.module.scss';\r\nvar override = css(templateObject_1 || (templateObject_1 = __makeTemplateObject([\"\\n  display: block;\\n  margin: 0 auto;\\n  border-color: #2f2f2f;\\n\"], [\"\\n  display: block;\\n  margin: 0 auto;\\n  border-color: #2f2f2f;\\n\"])));\r\nvar requestUserSchema = Yup.object().shape({\r\n    name: Yup.string()\r\n        .required('Por favor, informe um nome.'),\r\n    company: Yup.string()\r\n        .required('Por favor, informe uma empresa.'),\r\n    email: Yup.string()\r\n        .email('Por favor, informe um e-mail válido.')\r\n        .required('Por favor, informe um e-mail.'),\r\n});\r\nvar RequestUserLogin = function () {\r\n    var _a = useState(false), loading = _a[0], setLoading = _a[1];\r\n    var _b = useState(false), signInError = _b[0], setSignInError = _b[1];\r\n    var _c = useState(false), signInSuccess = _c[0], setSignInSuccess = _c[1];\r\n    var formik = useFormik({\r\n        initialValues: {\r\n            name: '',\r\n            company: '',\r\n            function: '',\r\n            position: '',\r\n            email: '',\r\n            cell: '',\r\n            phone: ''\r\n        },\r\n        validationSchema: requestUserSchema,\r\n        onSubmit: function (values) { return __awaiter(void 0, void 0, void 0, function () {\r\n            var _a;\r\n            return __generator(this, function (_b) {\r\n                switch (_b.label) {\r\n                    case 0:\r\n                        setLoading(true);\r\n                        _b.label = 1;\r\n                    case 1:\r\n                        _b.trys.push([1, 3, 4, 5]);\r\n                        return [4 /*yield*/, api.post(\"auth/requestNewUser\", values)];\r\n                    case 2:\r\n                        _b.sent();\r\n                        setSignInSuccess(true);\r\n                        return [3 /*break*/, 5];\r\n                    case 3:\r\n                        _a = _b.sent();\r\n                        setSignInError(true);\r\n                        return [3 /*break*/, 5];\r\n                    case 4:\r\n                        setLoading(false);\r\n                        return [7 /*endfinally*/];\r\n                    case 5: return [2 /*return*/];\r\n                }\r\n            });\r\n        }); }\r\n    });\r\n    return (_jsx(\"div\", __assign({ className: styles.body }, { children: _jsxs(\"form\", __assign({ onSubmit: formik.handleSubmit, onChange: function () { signInError && setSignInError(false); } }, { children: [_jsx(\"div\", __assign({ className: styles.logo }, { children: _jsx(\"img\", { className: styles.logoImg, src: LogoImg, alt: 'logoImage' }, void 0) }), void 0), _jsxs(\"div\", __assign({ className: styles.inputText }, { children: [_jsx(\"input\", { disabled: loading || signInSuccess, onChange: formik.handleChange, name: 'name', value: formik.values.name, type: \"text\", placeholder: \"Infome seu Nome\" }, void 0), _jsx(\"p\", __assign({ className: styles.errorMessage }, { children: formik.errors.name && formik.touched.name && _jsx(\"i\", { children: formik.errors.name }, void 0) }), void 0)] }), void 0), _jsxs(\"div\", __assign({ className: styles.inputText }, { children: [_jsx(\"input\", { disabled: loading || signInSuccess, onChange: formik.handleChange, name: 'company', value: formik.values.company, type: \"text\", placeholder: \"Infome sua Empresa\" }, void 0), _jsx(\"p\", __assign({ className: styles.errorMessage }, { children: formik.errors.company && formik.touched.company && _jsx(\"i\", { children: formik.errors.company }, void 0) }), void 0)] }), void 0), _jsxs(\"div\", __assign({ className: styles.inputText }, { children: [_jsx(\"input\", { disabled: loading || signInSuccess, onChange: formik.handleChange, name: 'function', value: formik.values.function, type: \"text\", placeholder: \"Infome sua Fun\\u00E7\\u00E3o\" }, void 0), _jsx(\"p\", __assign({ className: styles.errorMessage }, { children: formik.errors.function && formik.touched.function && _jsx(\"i\", { children: formik.errors.function }, void 0) }), void 0)] }), void 0), _jsxs(\"div\", __assign({ className: styles.inputText }, { children: [_jsx(\"input\", { disabled: loading || signInSuccess, onChange: formik.handleChange, name: 'position', value: formik.values.position, type: \"text\", placeholder: \"Infome seu Cargo\" }, void 0), _jsx(\"p\", __assign({ className: styles.errorMessage }, { children: formik.errors.position && formik.touched.position && _jsx(\"i\", { children: formik.errors.position }, void 0) }), void 0)] }), void 0), _jsxs(\"div\", __assign({ className: styles.inputText }, { children: [_jsx(\"input\", { disabled: loading || signInSuccess, onChange: formik.handleChange, name: 'email', value: formik.values.email, type: \"text\", placeholder: \"Infome Seu E-mail\" }, void 0), _jsx(\"p\", __assign({ className: styles.errorMessage }, { children: formik.errors.email && formik.touched.email && _jsx(\"i\", { children: formik.errors.email }, void 0) }), void 0)] }), void 0), _jsxs(\"div\", __assign({ className: styles.inputText }, { children: [_jsx(\"input\", { disabled: loading || signInSuccess, onChange: formik.handleChange, name: 'cell', value: formik.values.cell, type: \"text\", placeholder: \"Infome Seu Celular\" }, void 0), _jsx(\"p\", __assign({ className: styles.errorMessage }, { children: formik.errors.cell && formik.touched.cell && _jsx(\"i\", { children: formik.errors.cell }, void 0) }), void 0)] }), void 0), _jsxs(\"div\", __assign({ className: styles.inputText }, { children: [_jsx(\"input\", { disabled: loading || signInSuccess, onChange: formik.handleChange, name: 'phone', value: formik.values.phone, type: \"text\", placeholder: \"Infome Seu Telefone Fixo\" }, void 0), _jsx(\"p\", __assign({ className: styles.errorMessage }, { children: formik.errors.phone && formik.touched.phone && _jsx(\"i\", { children: formik.errors.phone }, void 0) }), void 0)] }), void 0), _jsx(\"button\", __assign({ disabled: loading || signInSuccess, className: \"mb-2 \" + (loading || signInSuccess ? styles.loading : '') + \" \", type: 'submit' }, { children: !loading ? 'Enviar Solicitação' : _jsx(ClipLoader, { css: override, loading: loading, size: 16 }, void 0) }), void 0), signInError && _jsx(Alert, { children: \" Erro, tente novamente.\" }, void 0), signInSuccess && _jsx(Alert, __assign({ success: true }, { children: \"Recebemos sua requisi\\u00E7\\u00E3o, em breve nossa equipe ir\\u00E1 enviar os pr\\u00F3ximos passos no endere\\u00E7o de e-mail informado.\" }), void 0), _jsx(\"div\", __assign({ className: styles.linkBack }, { children: _jsx(Link, __assign({ to: '/' }, { children: _jsxs(\"div\", { children: [_jsx(RiArrowGoBackFill, { size: 14 }, void 0), \"Voltar\"] }, void 0) }), void 0) }), void 0)] }), void 0) }), void 0));\r\n};\r\nexport default RequestUserLogin;\r\nvar templateObject_1;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { useHistory } from 'react-router-dom';\r\nimport { useEffect, useState } from 'react';\r\nimport { Table } from 'template/lib';\r\nimport useAuth from '../../hooks/useAuth';\r\nimport useTitle from '../../hooks/useTitle';\r\nimport api from '../../services/api';\r\nimport ModalBuyEnvelopes from \"../Modals/ModalBuyEnvelopes\";\r\nimport ModalTransferEnvelopes from \"../Modals/ModalTransferEnvelopes\";\r\nimport ModalConfirmation from \"../Modals/ModalConfirmation\";\r\nimport { FiPlus } from \"react-icons/fi\";\r\nimport { BsSearch, BsTrash } from \"react-icons/bs\";\r\nimport { FaUndo } from \"react-icons/fa\";\r\nimport { TbTransferIn } from \"react-icons/tb\";\r\nimport styles from './styles.module.scss';\r\nvar EnvelopesManagement = function () {\r\n    //const [idToChange, setIdToChange] = useState(0)\r\n    var _a = useAuth(), login = _a.login, handleLogout = _a.handleLogout;\r\n    var _b = useState([]), items = _b[0], setItems = _b[1];\r\n    var _c = useState(1), page = _c[0], setPage = _c[1];\r\n    var _d = useState(0), totalPages = _d[0], setTotalPages = _d[1];\r\n    var _e = useState(true), loading = _e[0], setLoading = _e[1];\r\n    var _f = useState(10), pageSize = _f[0], setPageSize = _f[1];\r\n    var _g = useState(false), refresh = _g[0], setRefresh = _g[1];\r\n    var _h = useState(false), hasNext = _h[0], setHasNext = _h[1];\r\n    var setTitle = useTitle().setTitle;\r\n    var _j = useState(false), showTransfersTable = _j[0], setShowTransfersTable = _j[1];\r\n    var _k = useState([]), transferredEnvelopes = _k[0], setTransferredEnvelopes = _k[1];\r\n    var _l = useState(true), loadingTransferredEnvelopes = _l[0], setLoadingTransferredEnvelopes = _l[1];\r\n    var _m = useState(1), pageDetails = _m[0], setPageDetails = _m[1];\r\n    var _o = useState(10), pageSizeDetails = _o[0], setPageSizeDetails = _o[1];\r\n    var _p = useState(false), hasNextDetails = _p[0], setHasNextDetails = _p[1];\r\n    var _q = useState(1), totalPagesDetails = _q[0], setTotalPagesDetails = _q[1];\r\n    var _r = useState(0), idPurchasedEnvelope = _r[0], setIdPurchasedEnvelope = _r[1];\r\n    var _s = useState(0), idTransferredEnvelope = _s[0], setIdTransferredEnvelope = _s[1];\r\n    var _t = useState(''), titleTransferredEnvelopes = _t[0], setTitleTransferredEnvelopes = _t[1];\r\n    var config = {\r\n        headers: { Authorization: \"Bearer \" + (login === null || login === void 0 ? void 0 : login.token) }\r\n    };\r\n    var history = useHistory();\r\n    useEffect(function () {\r\n        setTitle('Gerenciamento de Envelopes');\r\n        if (login && Date.now() > (login === null || login === void 0 ? void 0 : login.expiresIn) * 1000) {\r\n            handleLogout();\r\n            history.push('/');\r\n        }\r\n        if (!login) {\r\n            history.push('/');\r\n        }\r\n        //api.get(`/envelope-management/EnvelopeManagerList`, config)\r\n        //    .then(response => {\r\n        //        setTotalPages(response.data)\r\n        //        if (response.data > page) {\r\n        //            setHasNext(true)\r\n        //        }\r\n        //        else {\r\n        //            setHasNext(false)\r\n        //        }\r\n        //    })\r\n        api.get(\"/envelopes-management/purchased\", config)\r\n            .then(function (response) {\r\n            try {\r\n                setItems(response.data);\r\n            }\r\n            catch (e) {\r\n                console.log(response.data);\r\n            }\r\n        }).then(function () { return setLoading(false); });\r\n        if (showTransfersTable && idPurchasedEnvelope > 0) {\r\n            api.get(\"/envelopes-management/transferred-by-purchased-envelope/\" + idPurchasedEnvelope, config)\r\n                .then(function (response) {\r\n                setTransferredEnvelopes(response.data);\r\n            }).then(function () { return setLoadingTransferredEnvelopes(false); });\r\n        }\r\n    }, [refresh, page, pageSize]);\r\n    var lineBtnsPurchasedEnvelope;\r\n    lineBtnsPurchasedEnvelope = [\r\n        {\r\n            name: 'Consultar Transferências',\r\n            icon: _jsx(BsSearch, { size: 12, className: '' }, void 0),\r\n            fn: function (id) {\r\n                api.get(\"/envelopes-management/transferred-by-purchased-envelope/\" + id, config)\r\n                    .then(function (response) {\r\n                    setIdPurchasedEnvelope(id);\r\n                    setTransferredEnvelopes(response.data);\r\n                    setTitleTransferredEnvelopes(\"Transfer\\u00EAncias - Envelope ID: \" + id);\r\n                    setShowTransfersTable(true);\r\n                }).then(function () { return setLoadingTransferredEnvelopes(false); });\r\n            }\r\n        },\r\n        {\r\n            name: 'Excluir',\r\n            icon: _jsx(BsTrash, { size: 14, className: '' }, void 0),\r\n            fn: function (id) {\r\n                setIdPurchasedEnvelope(id);\r\n                handleOpenModalConfirmationDeleteEnvelope();\r\n            }\r\n        }\r\n    ];\r\n    var lineBtnsTransferredEnvelopes;\r\n    lineBtnsTransferredEnvelopes = [\r\n        {\r\n            name: 'Estornar',\r\n            icon: _jsx(FaUndo, { size: 14, className: '' }, void 0),\r\n            fn: function (id) {\r\n                setIdTransferredEnvelope(id);\r\n                handleOpenModalConfirmationUndoTransfer();\r\n            }\r\n        }\r\n    ];\r\n    var _u = useState(false), modalIsOpenBuyEnvelopes = _u[0], setmodalIsOpenBuyEnvelopes = _u[1];\r\n    function handleOpenModalBuyEnvelopes() {\r\n        setmodalIsOpenBuyEnvelopes(true);\r\n    }\r\n    function handleCloseModalBuyEnvelopes() {\r\n        setmodalIsOpenBuyEnvelopes(false);\r\n    }\r\n    var _v = useState(false), isOpenModalTransferEnvelopes = _v[0], setIsOpenModalTransferEnvelopes = _v[1];\r\n    function handleOpenModalTransferEnvelopes() {\r\n        setIsOpenModalTransferEnvelopes(true);\r\n    }\r\n    function handleCloseModalTransferEnvelopes() {\r\n        setIsOpenModalTransferEnvelopes(false);\r\n    }\r\n    var _w = useState(false), isOpenModalConfirmationDeleteEnvelope = _w[0], setIsOpenModalConfirmationDeleteEnvelope = _w[1];\r\n    function handleOpenModalConfirmationDeleteEnvelope() {\r\n        setIsOpenModalConfirmationDeleteEnvelope(true);\r\n    }\r\n    function handleCloseModalConfirmationDeleteEnvelope() {\r\n        setIsOpenModalConfirmationDeleteEnvelope(false);\r\n    }\r\n    var _x = useState(false), isOpenModalConfirmationUndoTransfer = _x[0], setIsOpenModalConfirmationUndoTransfer = _x[1];\r\n    function handleOpenModalConfirmationUndoTransfer() {\r\n        setIsOpenModalConfirmationUndoTransfer(true);\r\n    }\r\n    function handleCloseModalConfirmationUndoTransfer() {\r\n        setIsOpenModalConfirmationUndoTransfer(false);\r\n    }\r\n    var menuBtn = [\r\n        {\r\n            fn: function () {\r\n                handleOpenModalBuyEnvelopes();\r\n                setRefresh(!refresh);\r\n            },\r\n            icon: _jsx(FiPlus, { size: 20 }, void 0),\r\n            id: 1,\r\n            title: 'Comprar Envelopes'\r\n        },\r\n        {\r\n            fn: function () {\r\n                handleOpenModalTransferEnvelopes();\r\n                setRefresh(!refresh);\r\n            },\r\n            icon: _jsx(TbTransferIn, { size: 20, className: '' }, void 0),\r\n            id: 2,\r\n            title: 'Transferir Envelopes',\r\n        }\r\n    ];\r\n    return (_jsxs(_Fragment, { children: [_jsxs(\"div\", __assign({ className: styles.container }, { children: [_jsx(\"div\", __assign({ className: \"\" + (showTransfersTable ? styles.fisrtContentBoxBreak : styles.fisrtContentBox) }, { children: _jsx(Table, { setSize: setPageSize, size: pageSize, hasNext: hasNext, page: page, highLightLine: true, setPage: setPage, lineButton: lineBtnsPurchasedEnvelope, data: items, setData: setItems, \r\n                            //changeExistentContent={setLibraryState}\r\n                            totalPAges: totalPages, loading: loading, title: 'Envelopes', \r\n                            //setIdToChange={setIdToChange}\r\n                            refresh: setRefresh, headerButtons: menuBtn, \r\n                            //editable\r\n                            columns: [\r\n                                { label: 'ID', key: 'id' },\r\n                                { label: 'Data', key: 'date' },\r\n                                { label: 'Quantidade', key: 'quantity' },\r\n                                { label: 'Saldo', key: 'balance' },\r\n                                { label: 'Empresa', key: 'companyName' },\r\n                            ] }, void 0) }), void 0), showTransfersTable &&\r\n                        _jsx(\"div\", { className: 'h-0.5 w-full bg-gray-200' }, void 0), _jsx(\"div\", __assign({ className: \"\" + (showTransfersTable && styles.showTransfersTable) }, { children: showTransfersTable &&\r\n                            _jsx(_Fragment, { children: _jsx(Table, { setSize: setPageSizeDetails, size: pageSizeDetails, hasNext: hasNextDetails, page: pageDetails, setPage: setPageDetails, lineButton: lineBtnsTransferredEnvelopes, data: transferredEnvelopes, totalPAges: totalPagesDetails, loading: loadingTransferredEnvelopes, setData: setTransferredEnvelopes, title: titleTransferredEnvelopes, columns: [\r\n                                        { label: 'Data', key: 'date' },\r\n                                        { label: 'Quantidade', key: 'quantity' },\r\n                                        { label: 'Empresa', key: 'companyName' },\r\n                                        { label: 'Usuário', key: 'userName' },\r\n                                        { label: 'Quantidade total da transferência', key: 'totalTransferQuantity' },\r\n                                    ] }, void 0) }, void 0) }), void 0)] }), void 0), _jsx(ModalBuyEnvelopes, { refresh: refresh, setRefresh: setRefresh, modalIsOpenBuyEnvelopes: modalIsOpenBuyEnvelopes, handleOpenModalBuyEnvelopes: handleOpenModalBuyEnvelopes, handleCloseModalBuyEnvelopes: handleCloseModalBuyEnvelopes }, void 0), _jsx(ModalTransferEnvelopes, { refresh: refresh, setRefresh: setRefresh, isOpenModalTransferEnvelopes: isOpenModalTransferEnvelopes, handleOpenModalTransferEnvelopes: handleOpenModalTransferEnvelopes, handleCloseModalTransferEnvelopes: handleCloseModalTransferEnvelopes }, void 0), _jsx(ModalConfirmation, { setState: setShowTransfersTable, method: 'delete', url: \"/envelopes-management/purchased/\" + idPurchasedEnvelope, title: 'esse envelope', refresh: refresh, setRefresh: setRefresh, modalIsOpenConfirmation: isOpenModalConfirmationDeleteEnvelope, handleOpenModalConfirmation: handleOpenModalConfirmationDeleteEnvelope, handlecloseModalConfirmation: handleCloseModalConfirmationDeleteEnvelope }, void 0), _jsx(ModalConfirmation, { method: 'delete', url: \"/envelopes-management/transfer-undo/\" + idTransferredEnvelope, methodTitle: 'estornar', title: 'essa transferência', refresh: refresh, setRefresh: setRefresh, modalIsOpenConfirmation: isOpenModalConfirmationUndoTransfer, handleOpenModalConfirmation: handleOpenModalConfirmationUndoTransfer, handlecloseModalConfirmation: handleCloseModalConfirmationUndoTransfer }, void 0)] }, void 0));\r\n};\r\nexport default EnvelopesManagement;\r\n","var __assign = (this && this.__assign) || function () {\r\n    __assign = Object.assign || function(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n                t[p] = s[p];\r\n        }\r\n        return t;\r\n    };\r\n    return __assign.apply(this, arguments);\r\n};\r\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport logo from './assets/images/logo_cabecalho.png'; // PRODUÇÃO\r\n//import logo from './assets/images/logo_cabecalho_teste.png' // TODO: TESTE\r\nimport { BrowserRouter, Redirect, Route, Switch } from 'react-router-dom';\r\nimport Login from './pages/Login';\r\nimport Profile from './pages/Profile';\r\nimport Detail from './pages/Detail';\r\nimport Create from './pages/Create';\r\nimport Dashboard from './pages/Dashboard';\r\nimport { BiBuildingHouse } from 'react-icons/bi';\r\nimport { VscGraph, VscKey } from 'react-icons/vsc';\r\nimport { AiOutlineBell, AiOutlineFileSearch, AiOutlineRead } from 'react-icons/ai';\r\nimport { RiComputerLine } from 'react-icons/ri';\r\nimport { SlEnvolopeLetter } from \"react-icons/sl\";\r\nimport Search from './pages/Search';\r\nimport Company from './pages/Company';\r\nimport Licenses from './pages/Licenses';\r\nimport Libraries from './pages/Libraries';\r\nimport EnvelopeManagement from './pages/EnvelopeManagement';\r\nimport useAuth from './hooks/useAuth';\r\nimport Register from './pages/Register';\r\nimport ChangePassword from './pages/ChangePassword';\r\nimport RequestUserLogin from './pages/RequestUserLogin';\r\nimport useTitle from './hooks/useTitle';\r\nimport { SideBar } from 'template/lib';\r\nvar Routes = function () {\r\n    var _a = useAuth(), login = _a.login, handleLogout = _a.handleLogout;\r\n    var menu = [\r\n        { name: 'Início', link: '/profile', icon: _jsx(RiComputerLine, { className: 'text-xl' }, void 0) },\r\n        { name: 'Novo Chamado', link: '/create', icon: _jsx(AiOutlineBell, { className: 'text-xl' }, void 0) }\r\n    ];\r\n    if ((login === null || login === void 0 ? void 0 : login.role) === 'Administrator' || (login === null || login === void 0 ? void 0 : login.role) === 'Help') {\r\n        menu.push({ name: 'Dashboard', link: '/dashboard', icon: _jsx(VscGraph, { className: 'text-xl' }, void 0) }, { name: 'Pesquisa', link: '/search', icon: _jsx(AiOutlineFileSearch, { className: 'text-xl' }, void 0) }, { name: 'Empresas', link: '/company', icon: _jsx(BiBuildingHouse, { className: 'text-xl' }, void 0) });\r\n    }\r\n    else if ((login === null || login === void 0 ? void 0 : login.role) === 'CustomerAdmin') {\r\n        menu.push({ name: 'Licenças', link: '/licenses', icon: _jsx(VscKey, { className: 'text-xl' }, void 0) });\r\n    }\r\n    // Após estabilizar a atualização da biblioteca no 3D, remover do if abaixo a condição: && login?.role !== 'CustomerAdmin'\r\n    if ((login === null || login === void 0 ? void 0 : login.role) !== 'Customer' && (login === null || login === void 0 ? void 0 : login.role) !== 'CustomerAdmin' && (login === null || login === void 0 ? void 0 : login.hasPluginMaker) == true) {\r\n        menu.push({ name: 'Bibliotecas', link: '/libraries', icon: _jsx(AiOutlineRead, { className: 'text-xl' }, void 0) });\r\n    }\r\n    if ((login === null || login === void 0 ? void 0 : login.role) === 'Administrator') {\r\n        menu.push({ name: 'Gerenciamento de Envelopes', link: '/envelope-management', icon: _jsx(SlEnvolopeLetter, { className: 'text-xl' }, void 0) });\r\n    }\r\n    var Header = {\r\n        logOut: function () { return handleLogout(); },\r\n        user: {\r\n            name: login === null || login === void 0 ? void 0 : login.name,\r\n            company: login === null || login === void 0 ? void 0 : login.company\r\n        },\r\n        logoUrl: logo\r\n    };\r\n    var title = useTitle().title;\r\n    var logOut = function () {\r\n        handleLogout();\r\n    };\r\n    return (_jsx(BrowserRouter, { children: _jsxs(Switch, { children: [_jsx(Route, { path: '/', exact: true, component: Login }, void 0), _jsx(Route, { path: '/register', exact: true, component: Register }, void 0), _jsx(Route, { path: '/register/:id/:code', component: ChangePassword }, void 0), _jsx(Route, { path: '/requestuser/', exact: true, component: RequestUserLogin }, void 0), login ?\r\n                    _jsx(Route, { children: _jsx(\"div\", __assign({ className: 'pt-20 ' }, { children: _jsx(SideBar, __assign({ title: title || '', Header: Header, SideBar: { menu: menu } }, { children: _jsxs(_Fragment, { children: [_jsx(Route, { path: \"/profile\", exact: true, component: Profile }, void 0), _jsx(Route, { path: \"/profile/:id\", component: Detail }, void 0), _jsx(Route, { path: \"/profileNewPage/:id\", component: Detail }, void 0), _jsx(Route, { path: \"/create\", component: Create }, void 0), (login.role === 'Help' || login.role === 'Administrator') && _jsx(Route, { path: \"/dashboard\", component: Dashboard }, void 0), (login.role === 'Help' || login.role === 'Administrator') && _jsx(Route, { path: \"/search\", component: Search }, void 0), (login.role === 'Help' || login.role === 'Administrator') && _jsx(Route, { path: \"/company\", component: Company }, void 0), login.role === 'CustomerAdmin' && _jsx(Route, { path: \"/licenses\", component: Licenses }, void 0), login.role !== 'Customer' && login.role !== 'CustomerAdmin' && (login === null || login === void 0 ? void 0 : login.hasPluginMaker) == true && _jsx(Route, { path: \"/libraries\", component: Libraries }, void 0), login.role === 'Administrator' && _jsx(Route, { path: \"/envelope-management\", component: EnvelopeManagement }, void 0)] }, void 0) }), void 0) }), void 0) }, void 0)\r\n                    :\r\n                        _jsxs(_Fragment, { children: [_jsx(Route, { path: '*', exact: true, component: Login }, void 0), !window.location.href.includes('profile/') &&\r\n                                    _jsx(Redirect, { from: '*', to: '/' }, void 0)] }, void 0)] }, void 0) }, void 0));\r\n};\r\nexport default Routes;\r\n","import { jsx as _jsx } from \"react/jsx-runtime\";\r\nimport Routes from \"./routes\";\r\nimport { AuthContextProvider } from './context/authContext';\r\nimport { TitleContextProvider } from \"./context/titleContext\";\r\nfunction App() {\r\n    return (_jsx(TitleContextProvider, { children: _jsx(AuthContextProvider, { children: _jsx(Routes, {}, void 0) }, void 0) }, void 0));\r\n}\r\nexport default App;\r\n","import { jsx as _jsx } from \"react/jsx-runtime\";\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './index.css';\r\nimport App from './App';\r\nimport './global.css';\r\nReactDOM.render(_jsx(React.StrictMode, { children: _jsx(App, {}, void 0) }, void 0), document.getElementById('root'));\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"body\":\"styles_body__2jn1b\",\"logo\":\"styles_logo__2xrjs\",\"logoImg\":\"styles_logoImg__VQ8zQ\",\"inputText\":\"styles_inputText__Go-LT\",\"errorMessage\":\"styles_errorMessage__31I7h\",\"error\":\"styles_error__vtSW5\",\"loading\":\"styles_loading__cFSXS\",\"linkBack\":\"styles_linkBack__3hCA9\",\"message\":\"styles_message__2u9ei\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"styles_header__19GaP\",\"content\":\"styles_content__2QPvN\",\"flexButton\":\"styles_flexButton__o6SSu\",\"containerCheckBoxInput\":\"styles_containerCheckBoxInput__OIrGt\",\"formikErrors\":\"styles_formikErrors__udnrd\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"styles_header__2S14w\",\"content\":\"styles_content__rEFay\",\"flexButton\":\"styles_flexButton__um6Al\",\"containerCheckBoxInput\":\"styles_containerCheckBoxInput__3_ZAm\",\"labelEnableSSL\":\"styles_labelEnableSSL__3FMX0\",\"labelChangePassword\":\"styles_labelChangePassword__3ppVT\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__1tUxb\",\"fisrtContentBox\":\"styles_fisrtContentBox__3wDlY\",\"fisrtContentBoxBreak\":\"styles_fisrtContentBoxBreak__1mXcY\",\"detailsTable\":\"styles_detailsTable__RfYhW\",\"divConfirmReset\":\"styles_divConfirmReset__16qZG\",\"divCancelReset\":\"styles_divCancelReset__3dgXo\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"styles_header__2xDxV\",\"content\":\"styles_content__1TJPX\",\"flexButton\":\"styles_flexButton__286GP\",\"formikErrors\":\"styles_formikErrors__2VB-C\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"styles_header__1QeZq\",\"content\":\"styles_content__icF_B\",\"flexButton\":\"styles_flexButton__2ry98\",\"containerCheckBoxInput\":\"styles_containerCheckBoxInput__2c2_O\",\"labelImplantation\":\"styles_labelImplantation__VvnjU\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"styles_header__39Pwh\",\"withError\":\"styles_withError__2bEL_\",\"withOutError\":\"styles_withOutError__69TQO\",\"content\":\"styles_content__Rj1sn\",\"flexButton\":\"styles_flexButton__2M5OY\",\"containerCheckBoxInput\":\"styles_containerCheckBoxInput__28wW0\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__3o3tH\",\"containerBlock\":\"styles_containerBlock__AWBA5\",\"containerAssignedToMe\":\"styles_containerAssignedToMe__2o8ie\",\"containerNotAssigned\":\"styles_containerNotAssigned__3Q6Q4\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"styles_header__2_Bx_\",\"withError\":\"styles_withError__s5n3j\",\"withOutError\":\"styles_withOutError__3gAB7\",\"content\":\"styles_content__1SZ0Y\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__1IoY3\",\"fisrtContentBox\":\"styles_fisrtContentBox__pfg6A\",\"fisrtContentBoxBreak\":\"styles_fisrtContentBoxBreak__3nGn7\",\"detailsTable\":\"styles_detailsTable__29AQ-\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__ZGuk-\",\"fisrtContentBox\":\"styles_fisrtContentBox__2cBX-\",\"fisrtContentBoxBreak\":\"styles_fisrtContentBoxBreak__3BvA_\",\"showTransfersTable\":\"styles_showTransfersTable__2y6ts\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"grid\":\"styles_grid__1ZdvF\",\"checkBoxOld\":\"styles_checkBoxOld__16zuI\",\"checkBox\":\"styles_checkBox__2xX7Y\",\"button\":\"styles_button__1nkon\",\"inputs\":\"styles_inputs__3sNNm\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"styles_header__q-sXI\",\"content\":\"styles_content__2lO4t\",\"flexButton\":\"styles_flexButton__1TQy3\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"styles_header__LX_E9\",\"content\":\"styles_content__PrsT2\",\"flexButton\":\"styles_flexButton__2bqHT\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"styles_header__3v9oj\",\"content\":\"styles_content__1F0s5\",\"flexButton\":\"styles_flexButton__1dtmc\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"styles_header__3RSto\",\"content\":\"styles_content__1HFQR\",\"flexButton\":\"styles_flexButton__3lG75\",\"containerCheckBoxInput\":\"styles_containerCheckBoxInput__2JKJ1\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"styles_container__1o9Tb\",\"content\":\"styles_content__GN4qK\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"styles_header__3rBiF\",\"content\":\"styles_content__14fvQ\"};"],"sourceRoot":""}