+ {children}
+
+ )
+}
+
+export function MqttForm({
+ config,
+ onChange,
+ configuredSecrets,
+ fieldErrors = {},
+}: MqttFormProps) {
+ const { t } = useTranslation()
+ const prefix = asString(config.topic_prefix) || "/picoclaw"
+ const agentID = asString(config.agent_id) || "{agent_id}"
+ const topicBase = `${prefix}/${agentID}/{client_id}`
+
+ return (
+ + {t("channels.mqtt.uplink")} +
+
+ {`{\n "text": "your message"\n}`}
+
+ + + {t("channels.mqtt.fieldText")} + + {" — "} + {t("channels.mqtt.uplinkTextDesc")} +
++ {t("channels.mqtt.downlink")} +
+
+ {`{\n "text": "agent response"\n}`}
+
+ + + {t("channels.mqtt.fieldText")} + + {" — "} + {t("channels.mqtt.downlinkTextDesc")} +
++ {t("channels.mqtt.topicParams")} +
++ + {prefix} + + {" — "} + {t("channels.mqtt.topicPrefixDesc")} +
++ + {agentID} + + {" — "} + {t("channels.mqtt.agentIdDesc")} +
++ + {"{client_id}"} + + {" — "} + {t("channels.mqtt.clientIdDesc")} +
+