(t0)
| 53 | onCancel: () => void; |
| 54 | }; |
| 55 | export function PluginOptionsDialog(t0) { |
| 56 | const $ = _c(70); |
| 57 | const { |
| 58 | title, |
| 59 | subtitle, |
| 60 | configSchema, |
| 61 | initialValues, |
| 62 | onSave, |
| 63 | onCancel |
| 64 | } = t0; |
| 65 | let t1; |
| 66 | if ($[0] !== configSchema) { |
| 67 | t1 = Object.keys(configSchema); |
| 68 | $[0] = configSchema; |
| 69 | $[1] = t1; |
| 70 | } else { |
| 71 | t1 = $[1]; |
| 72 | } |
| 73 | const fields = t1; |
| 74 | let t2; |
| 75 | if ($[2] !== configSchema || $[3] !== initialValues) { |
| 76 | t2 = key => { |
| 77 | if (configSchema[key]?.sensitive === true) { |
| 78 | return ""; |
| 79 | } |
| 80 | const v = initialValues?.[key]; |
| 81 | return v === undefined ? "" : String(v); |
| 82 | }; |
| 83 | $[2] = configSchema; |
| 84 | $[3] = initialValues; |
| 85 | $[4] = t2; |
| 86 | } else { |
| 87 | t2 = $[4]; |
| 88 | } |
| 89 | const initialFor = t2; |
| 90 | const [currentFieldIndex, setCurrentFieldIndex] = useState(0); |
| 91 | let t3; |
| 92 | if ($[5] === Symbol.for("react.memo_cache_sentinel")) { |
| 93 | t3 = {}; |
| 94 | $[5] = t3; |
| 95 | } else { |
| 96 | t3 = $[5]; |
| 97 | } |
| 98 | const [values, setValues] = useState(t3); |
| 99 | let t4; |
| 100 | if ($[6] !== fields[0] || $[7] !== initialFor) { |
| 101 | t4 = () => fields[0] ? initialFor(fields[0]) : ""; |
| 102 | $[6] = fields[0]; |
| 103 | $[7] = initialFor; |
| 104 | $[8] = t4; |
| 105 | } else { |
| 106 | t4 = $[8]; |
| 107 | } |
| 108 | const [currentInput, setCurrentInput] = useState(t4); |
| 109 | const currentField = fields[currentFieldIndex]; |
| 110 | const fieldSchema = currentField ? configSchema[currentField] : null; |
| 111 | let t5; |
| 112 | if ($[9] === Symbol.for("react.memo_cache_sentinel")) { |
nothing calls this directly
no test coverage detected