+
+
+ {selectedPallet && pallet && (
+
+ )}
+
+ {selectedConstant?.docs.length && (
+
+ Docs
+
+
+ )}
+ {selectedConstant && (
+
+ )}
+
+ )
+})
+
+const constantValueProps$ = state(
+ lookup$.pipe(
+ map((lookup) => ({ lookup, builder: getDynamicBuilder(lookup) })),
+ ),
+ null,
+)
+
+const ConstantValue: FC<{ title: string; type: number; value: HexString }> = ({
+ title,
+ type,
+ value,
+}) => {
+ const props = useStateObservable(constantValueProps$)
+ const [mode, setMode] = useState<"json" | "decoded">("decoded")
+
+ if (!props) return null
+
+ const decoded = props.builder.buildDefinition(type).dec(value)
+ const complexity = getTypeComplexity(props.lookup(type), true)
+
+ if (complexity === "inline") {
+ return (
+