import{useState as a,useEffect as r}from"react";import s from"../services/check.js";function l(e){const[o,t]=a(process.env.NODE_ENV==="development"?{valid:!0,allowed:!0}:{});return r(()=>{async function n(){const i=await s(e);t(i)}n()},[e]),{licenseInfo:o,isValid:f(o)}}function f(e){return e.valid&&e.allowed&&!e.expired||!!e.local}export{l as useLicense};
