fn(language$990, config$3, path$0, body$1) =>
let tool$4 = @html-ui.api-tool(name: @html-ui.segment(segments: @core.string-split(text: $0, separator: "/"), index: 2));
match @core.and(left: $3.editable, right: @core.equal(left: $0, right: "/api/secret")) {
true =>
@html-ui.save-secret(language: $990, body: $1),
false =>
match @core.and(
left: @core.and(left: $3.editable, right: @std.string-starts-with(value: $0, prefix: "/api/")),
right: @core.not(value: @core.equal(left: $4, right: ""))
) {
true =>
@html-ui.rpc(
config: $3,
method: $4,
request: $1,
then: fn(response$2) =>
@html-ui.text-response(status: $2.status, text: $2.text)
),
false =>
@html-ui.text-response(status: 404, text: "not found")
}
}