import Box from "@mui/material/Box";
import Stack from "@mui/material/Stack";
import TextField from "@mui/material/TextField";
import {
GLOBAL_KEY,
REMAIN_KEY,
OPT_LANGS_FROM,
OPT_LANGS_TO,
OPT_STYLE_ALL,
OPT_STYLE_DIY,
OPT_STYLE_USE_COLOR,
} from "../../config";
import { useI18n } from "../../hooks/I18n";
import MenuItem from "@mui/material/MenuItem";
import Grid from "@mui/material/Grid";
import { useOwSubRule } from "../../hooks/SubRules";
import { useApiList } from "../../hooks/Api";
export default function OwSubRule() {
const i18n = useI18n();
const { owSubrule, updateOwSubrule } = useOwSubRule();
const { enabledApis } = useApiList();
const handleChange = (e) => {
e.preventDefault();
const { name, value } = e.target;
updateOwSubrule({ [name]: value });
};
const {
apiSlug,
fromLang,
toLang,
textStyle,
transOpen,
bgColor,
textDiyStyle,
} = owSubrule;
const RemainItem = (
);
const GlobalItem = (
);
return (
{RemainItem}
{GlobalItem}
{RemainItem}
{GlobalItem}
{enabledApis.map((api) => (
))}
{RemainItem}
{GlobalItem}
{OPT_LANGS_FROM.map(([lang, name]) => (
))}
{RemainItem}
{GlobalItem}
{OPT_LANGS_TO.map(([lang, name]) => (
))}
{RemainItem}
{GlobalItem}
{OPT_STYLE_ALL.map((item) => (
))}
{OPT_STYLE_USE_COLOR.includes(textStyle) && (
)}
{textStyle === OPT_STYLE_DIY && (
)}
);
}