import React from 'react'; import { toBase64 } from '../util'; import ConsentProblems from './consent-problems'; import emailHostSettings from './email-host-settings'; import { EmailTemplate3Config } from './email-template-3'; export default function EmailTemplate3Controls({ config, setConfig, }: { config: EmailTemplate3Config; setConfig: React.Dispatch>; }): JSX.Element { const p = config.pronoun; return (
{emailHostSettings(config, setConfig)}
{config.popup_type !== 'none' ? (
{ const popup_screenshot_base64 = await toBase64(e.target.files[0]); setConfig((v) => ({ ...v, popup_screenshot_base64, })); }, }} />
) : ( '' )}
{config.popup_action === 'closed' ? (
setConfig((v) => ({ ...v, popup_closed_how: e.target.value, })) } />
) : ( '' )} {config.popup_type !== 'none' ? (
setConfig((v) => ({ ...v, popup_mentions_passive_consent: e.target.checked, })) } />
) : ( '' )} {config.popup_mentions_passive_consent ? (
setConfig((v) => ({ ...v, popup_passive_consent_text: e.target.value, })) } />
) : ( '' )}
); }