import Captcha from "./Captcha.wrn"
import { Card } from "@wrnexus/ui"

component CaptchaField {
  props {
    title: string = "Security verification"
    description: string = "Complete the challenge before submitting."
    provider: string = "self-hosted"
    type: string = "alphanumeric"
    action: string = "form-submit"
    color: string = "primary"
    size: string = "md"
    captchaSize: string = "normal"
    class: string = ""
  }
  view {
    <Card {...attrs} title='{title}' description='{description}' color='{color}' size='{size}' class='{class}'>
      <Captcha provider='{provider}' type='{type}' action='{action}' color='{color}' size='{captchaSize}' compact='{size == "sm"}' />
    </Card>
  }
}
