' . esc_html($emoji) . '

' : ''; $pre = $preheader !== '' ? '
' . esc_html($preheader) . '
' : ''; return '' . $headingEsc . '' . '' . $pre . '' . '
' . '' . '' . '' . '' . '
' . $emojiHtml . '

' . $headingEsc . '

' . '
' . $innerHtml . '
' . '

' . $footerLine . '

' . '
' . '

' . esc_html__('You received this email because of a booking or enquiry on our site.', 'yatra') . '

' . '
'; } /** * Admin / internal email: compact, high-contrast header. */ public static function admin( string $emoji, string $heading, string $innerHtml, ?string $footerLine = null ): string { $headingEsc = esc_html($heading); $footer = $footerLine ?? esc_html__('Yatra · Admin notification', 'yatra'); return '' . $headingEsc . '' . '' . '' . '
' . '' . '' . '' . '' . '
' . '' . '' . '' . '
' . esc_html($emoji) . '' . $headingEsc . '
' . '
' . $innerHtml . '
' . $footer . '
'; } /** * Light card block for key–value rows (inner fragment for customer emails). * * @param array $rows label/value may contain merge tags */ public static function detailCard(array $rows): string { if ($rows === []) { return ''; } $out = ''; $filtered = array_values(array_filter($rows, static function (array $row): bool { return trim((string) ($row['value'] ?? '')) !== ''; })); $last = count($filtered) - 1; foreach ($filtered as $i => $row) { $label = $row['label'] ?? ''; $value = $row['value'] ?? ''; $borderBottom = $i < $last ? 'border-bottom:1px solid #e2e8f0;' : ''; $out .= ''; } $out .= '
' . '' . '' . '' . '' . '
' . $label . '' . $value . '
'; return $out; } /** * Primary CTA button (table for Outlook). */ public static function button(string $href, string $label): string { $hrefEsc = esc_url($href); $labelEsc = esc_html($label); return '' . '
' . '' . $labelEsc . '
'; } }