/* eslint-disable @typescript-eslint/camelcase */ import { encodeCrock, stringToBytes } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { useState } from "preact/hooks"; import { useAnastasisContext } from "../../context/anastasis"; import { AnastasisClientFrame } from "./index"; import { TextInput } from "../../components/fields/TextInput"; import { FileInput } from "../../components/fields/FileInput"; export function SecretEditorScreen(): VNode { const reducer = useAnastasisContext(); const [secretValue, setSecretValue] = useState(""); const currentSecretName = reducer?.currentReducerState && "secret_name" in reducer.currentReducerState && reducer.currentReducerState.secret_name; const [secretName, setSecretName] = useState(currentSecretName || ""); if (!reducer) { return