import type { UpsertFormSettingsInput } from '@admin/actions/forms' import type { FormNotificationEntry } from '@admin/types/form-notifications' export function toFormSettingsInput(entry: FormNotificationEntry): UpsertFormSettingsInput { return { notificationEmails: entry.enabled && entry.emails.length > 0 ? entry.emails.join(', ') : null } }