'use client';
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("@emotion/styled");const l=require("../../../ui/button/button.cjs"),u=require("../../../ui/chip/chip.cjs"),m=require("../../../../hooks/use-config.cjs"),r=require("@heroicons/react/24/outline"),f=require("../../common/error-boundary.cjs"),d=f.withErrorBoundary(function({status:i,email:s,onRetry:n,className:t}){const{components:c}=m.useConfig(),a=c.Button??l.Button,o=(()=>{switch(i){case"sent":return{color:"primary",icon:e.jsx(r.EnvelopeIcon,{className:"h-4 w-4"}),message:`Verification code sent to ${s}`};case"verified":return{color:"success",icon:e.jsx(r.CheckCircleIcon,{className:"h-4 w-4"}),message:`Email ${s} verified successfully`};case"error":return{color:"danger",icon:e.jsx(r.XCircleIcon,{className:"h-4 w-4"}),message:"Verification failed"};case"expired":return{color:"warning",icon:e.jsx(r.XCircleIcon,{className:"h-4 w-4"}),message:"Verification code expired"};default:return{color:"default",icon:e.jsx(r.EnvelopeIcon,{className:"h-4 w-4"}),message:"Email verification"}}})();return e.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg ${t||""}`,children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(u.Chip,{color:o.color,variant:"flat",startContent:o.icon,children:o.message})}),(i==="error"||i==="expired")&&n&&e.jsx(a,{size:"sm",color:"primary",variant:"flat",onClick:n,startContent:e.jsx(r.ArrowPathIcon,{className:"h-3 w-3"}),children:"Retry"})]})});exports.EmailVerificationStatus=d;
//# sourceMappingURL=email-verification-status.cjs.map
