"use strict";var __awaiter=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(c,r){function s(e){try{u(n.next(e))}catch(e){r(e)}}function o(e){try{u(n.throw(e))}catch(e){r(e)}}function u(e){var t;e.done?c(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,o)}u((n=n.apply(e,t||[])).next())}))},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useLicense=void 0;const react_1=require("react"),check_1=__importDefault(require("../services/check"));function useLicense(e){const[t,i]=(0,react_1.useState)("development"===process.env.NODE_ENV?{valid:!0,allowed:!0}:{});return(0,react_1.useEffect)((()=>{!function(){__awaiter(this,void 0,void 0,(function*(){const t=yield(0,check_1.default)(e);i(t)}))}()}),[e]),{licenseInfo:t,isValid:isValidLicense(t)}}function isValidLicense(e){return e.valid&&e.allowed&&!e.expired||!!e.local}exports.useLicense=useLicense;
//# sourceMappingURL=useLicense.js.map