import React, {FC} from "react";
import {useAtomValue} from "jotai";
import {PermissionToLoadPresetsAtom} from "../atoms";
import {PresetsHaveNoPermissionToLoad} from "./PresetsHaveNoPermissionToLoad";
import {GuidedPresets} from "./GuidedPresets";

export type PresetsProps = {
}

export const Presets: FC<PresetsProps> = ({}) => {
    const havePermissionToLoadPresets = useAtomValue(PermissionToLoadPresetsAtom);

    if (!havePermissionToLoadPresets) {
        return <PresetsHaveNoPermissionToLoad />
    }

    return <GuidedPresets/>
}
