import { useEffect, useState } from 'react';
import { dashboard } from '@wix/dashboard';
export function useEnvironment() {
    const [environment, setEnvironment] = useState();
    useEffect(() => {
        const { disconnect } = dashboard.observeState((_, env) => {
            setEnvironment(env);
        });
        return disconnect;
    }, []);
    return environment;
}
//# sourceMappingURL=useEnvironment.js.map