/** * Email → Delivery: admin/from identity and optional SMTP only. */ import React from "react"; import { Info } from "lucide-react"; import { __ } from "../../lib/i18n"; import { Input } from "../ui/input"; import { Select } from "../ui/select"; import { Label } from "../ui/label"; import type { EmailFieldChangeHandler, EmailSettingsValues, } from "./email-settings-types"; const Field = React.memo( ({ id, label, description, required = false, children, }: { id: string; label: string; description?: React.ReactNode; required?: boolean; children: React.ReactNode; }) => (
{description && (

{description}

)} {children}
), ); Field.displayName = "Field"; const SectionDivider = ({ title }: { title: string }) => (

{title}

); export type EmailDeliverySectionProps = { values: Pick< EmailSettingsValues, | "admin_email" | "from_email" | "from_name" | "smtp_enabled" | "smtp_host" | "smtp_port" | "smtp_username" | "smtp_password" | "smtp_encryption" >; onFieldChange: EmailFieldChangeHandler; }; export const EmailDeliverySection: React.FC = ({ values, onFieldChange, }) => (

{__("Email Configuration", "yatra")}

{__( "Use custom SMTP server instead of default WordPress mail", "yatra", )}

{values.smtp_enabled && ( <>
)}
); export default EmailDeliverySection;