import React from "react";
import { Loading } from "./Loading";
import { Subcategories } from "./Subcategories";
import { List } from "./List";
import * as styles from "./styles";
import { useLocalContent } from "~/sdks/LocalContent/context";
export function ScorePoiList({ scoreKey, isLoading = false, showPois = true, pois, onPOISelected, }) {
    const { availablePoiSubcategories, selectedPoiSubcategory, handleSelectPoiSubcategory, } = useLocalContent();
    if (isLoading) {
        return React.createElement(Loading, null);
    }
    if (typeof pois === "undefined" || selectedPoiSubcategory === null) {
        return null;
    }
    return (React.createElement("div", { className: styles.container },
        React.createElement(Subcategories, { availablePoiSubcategories: availablePoiSubcategories, scoreKey: scoreKey, selectedSubcategory: selectedPoiSubcategory, onSelectCategory: handleSelectPoiSubcategory }),
        typeof pois[selectedPoiSubcategory] !== "undefined" && (React.createElement(List, { pois: pois[selectedPoiSubcategory], showPois: showPois, onSelect: onPOISelected }))));
}
//# sourceMappingURL=index.js.map