import { Dialog, RadioGroup } from "@headlessui/react";
import { Icon } from "@wordpress/components";
import { useRef, useState } from "@wordpress/element";
import { __ } from "@wordpress/i18n";
import { cog } from "@wordpress/icons";
import classnames from "classnames";
import { AnimatePresence, motion } from "framer-motion";
import { useGlobalState } from "../state/global";
import { ModalCloseButton } from "./ModalCloseButton";
export const SettingsModal = () => {
const [open, setOpen] = useState(false);
const initialFocus = useRef(null);
const { currentTheme, importing } = useGlobalState();
return (
<>
{open && (
)}
>
);
};
const SettingsSection = () => {
type imageSizes = "regular" | "full" | "raw";
const { imageSize, setImageSize } = useGlobalState();
return (
// biome-ignore lint/a11y/useSemanticElements: fieldset resets the grid layout these controls rely on
{__("Image Size", "unlimited-photos")}
{__(
"Choose which image quality/size to import",
"unlimited-photos",
)}
{["regular", "full", "raw"].map((value) => {
return (
setImageSize(value as imageSizes)}
className="h-4 w-4 m-0"
/>
);
})}
);
};
const ThemeSelect = () => {
const { currentTheme, setCurrentTheme } = useGlobalState();
return (
{__("Theme", "unlimited-photos")}
{["default", "light", "midnight"].map((theme) => (
classnames(
{ "ring-2 ": active },
"relative bg-white border shadow-sm p-4 flex cursor-pointer focus:outline-none border-gray-300 ring-main-blue ring-offset-2 ring-offset-white",
)
}
>
{({ checked }) => (
<>
{theme}
>
)}
))}
);
};