import { Button, Heading, Row, Section, Text } from "react-email";
import z from "zod";
import Base from "./base";

export const InvitoMailTag = "invito";
export const InvitoPropsSchema = z.object({
	nome: z.string(),
	//email: z.email(),
	//password: z.string(),
	inviteUrl: z.url(),
});

const Invito = ({
	nome,
	inviteUrl,
	//email,
	//password
}: z.infer<typeof InvitoPropsSchema>) => {
	return (
		<Base preview="Procedi ora su Infoalloggi.it">
			<>
				<Heading className="text-center text-3xl leading-8">
					Procedi ora su Infoalloggi.it
				</Heading>
				<Section className="px-5 text-left text-base md:px-12">
					<Row>
						<Text>
							Ciao {nome},<br />
							Accedi ora al servizio di ricerca Infoalloggi, dove potrai andare
							a contattare direttamente i proprietari degli immobili
							disponibili.
						</Text>
					</Row>
					{/* <Row>
						<Text>
							Le tue credenziali sono:
							<br />
							Email: <b>{email}</b>
							<br />
							Password: <b>{password}</b>
						</Text>
					</Row> */}

					<Section className="mb-5">
						<Button
							className="mx-auto box-border inline-flex h-10 items-center justify-center whitespace-nowrap rounded-md bg-sky-500 px-4 py-2 text-center align-middle font-semibold text-white"
							href={inviteUrl}
							//href={`${env.BASE_URL}/area-riservata/dashboard`}
						>
							Clicca qui per procedere
						</Button>
					</Section>
					<Section></Section>
				</Section>
			</>
		</Base>
	);
};

export default Invito;
