module TwoCaptcha.Internal.Types.HCaptcha where
import Control.Lens (Lens', (&), (?~))
import Data.Text (Text)
import TwoCaptcha.Internal.Types.Captcha (Captcha, HasCaptchaLenses (method), HasCommonCaptchaLenses, HasPageURL, HasProxy, defaultCaptcha, mkParamLens, mkParamLensBool)
newtype HCaptcha = MkHCaptcha Captcha deriving (Int -> HCaptcha -> ShowS
[HCaptcha] -> ShowS
HCaptcha -> String
(Int -> HCaptcha -> ShowS)
-> (HCaptcha -> String) -> ([HCaptcha] -> ShowS) -> Show HCaptcha
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HCaptcha] -> ShowS
$cshowList :: [HCaptcha] -> ShowS
show :: HCaptcha -> String
$cshow :: HCaptcha -> String
showsPrec :: Int -> HCaptcha -> ShowS
$cshowsPrec :: Int -> HCaptcha -> ShowS
Show)
instance HasCommonCaptchaLenses HCaptcha
instance HasCaptchaLenses HCaptcha
instance HasPageURL HCaptcha
instance HasProxy HCaptcha
hCaptcha :: HCaptcha
hCaptcha :: HCaptcha
hCaptcha = Captcha -> HCaptcha
MkHCaptcha (Captcha
defaultCaptcha Captcha -> (Captcha -> Captcha) -> Captcha
forall a b. a -> (a -> b) -> b
& (Maybe Text -> Identity (Maybe Text))
-> Captcha -> Identity Captcha
forall a. HasCaptchaLenses a => Lens' a (Maybe Text)
method ((Maybe Text -> Identity (Maybe Text))
-> Captcha -> Identity Captcha)
-> Text -> Captcha -> Captcha
forall s t a b. ASetter s t a (Maybe b) -> b -> s -> t
?~ Text
"hcaptcha")
siteKey :: Lens' HCaptcha (Maybe Text)
siteKey :: (Maybe Text -> f (Maybe Text)) -> HCaptcha -> f HCaptcha
siteKey = Text -> Lens' HCaptcha (Maybe Text)
forall a. Coercible Captcha a => Text -> Lens' a (Maybe Text)
mkParamLens Text
"sitekey"
hInvisible :: Lens' HCaptcha (Maybe Bool)
hInvisible :: (Maybe Bool -> f (Maybe Bool)) -> HCaptcha -> f HCaptcha
hInvisible = Text -> Lens' HCaptcha (Maybe Bool)
forall a. Coercible Captcha a => Text -> Lens' a (Maybe Bool)
mkParamLensBool Text
"invisible"
customData :: Lens' HCaptcha (Maybe Text)
customData :: (Maybe Text -> f (Maybe Text)) -> HCaptcha -> f HCaptcha
customData = Text -> Lens' HCaptcha (Maybe Text)
forall a. Coercible Captcha a => Text -> Lens' a (Maybe Text)
mkParamLens Text
"data"