import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { AnastasisClientFrame } from ".";
import {
ChallengeFeedback,
ChallengeFeedbackStatus,
ChallengeInfo,
} from "../../../../anastasis-core/lib";
import { AsyncButton } from "../../components/AsyncButton";
import { TextInput } from "../../components/fields/TextInput";
import { Notifications } from "../../components/Notifications";
import { useAnastasisContext } from "../../context/anastasis";
function SolveOverviewFeedbackDisplay(props: { feedback?: ChallengeFeedback }): VNode {
const { feedback } = props;
if (!feedback) {
return
;
}
switch (feedback.state) {
case ChallengeFeedbackStatus.Message:
return ();
case ChallengeFeedbackStatus.Payment:
return
To pay you can click here
}]} />
case ChallengeFeedbackStatus.AuthIban:
return ;
case ChallengeFeedbackStatus.ServerFailure:
return ();
case ChallengeFeedbackStatus.RateLimitExceeded:
return ();
case ChallengeFeedbackStatus.Redirect:
return (
Please visit this link: {feedback.redirect_url}
}]} />);
case ChallengeFeedbackStatus.Unsupported:
return ();
case ChallengeFeedbackStatus.TruthUnknown:
return ();
default:
return (