/*!
 * Copyright 2017 by ChartIQ, Inc.
 * All rights reserved.
 */
import React, { useState, useEffect } from "react";
import { createStore } from "./stores/appStore";
import { AppCatalogComponent } from "./AppCatalogComponent";
import storeActions from "./stores/storeActions";
import { useTitle } from "../../hooks/useTitle";
/**
 * @deprecated This feature is deprecated. It is no longer supported and will likely go away in the future. Please contact
 * support@finsemble.com if you are using this component.
 *
 * A UI component that stores all the applications and allows the end user to add, remove, browse, or launch an application
 * from the app catalog window.
 */
export const AppCatalog = () => {
    const [isReady, setIsReady] = useState(false);
    useTitle("App Catalog");
    // Add styles to the app catalog window's body.
    useEffect(() => {
        document.body.classList.add("app-catalog-body");
    }, []);
    useEffect(() => {
        createStore(() => {
            storeActions.initialize(() => {
                setIsReady(true);
            });
        });
        return () => { };
    });
    return React.createElement(React.Fragment, null, isReady && React.createElement(AppCatalogComponent, null));
};
//# sourceMappingURL=AppCatalog.js.map