import { createSignal, Show } from "solid-js"; import { hasUserScope } from "../../auth/scope-utils"; import { Button } from "../button.jsx"; export const ConfirmSubmit = (props: { isCreate: boolean; onConfirm: (validate: boolean | undefined, recreate: boolean) => void; onClose: () => void; }) => { const [validate, setValidate] = createSignal(undefined); const [recreate, setRecreate] = createSignal(false); const getValidateLabel = () => { return ( validate() === true ? "True" : validate() === false ? "False" : "Unset" ); }; const cycleValidate = () => { setValidate( validate() === undefined ? true : validate() === true ? false : undefined, ); }; return ( <>

{props.isCreate ? "Create" : "Edit"} record

Set to 'false' to skip lexicon schema validation by the PDS, 'true' to require it, or leave unset to validate only for known lexicons.

Delete the existing record and create a new one with the same record key.

); };