Replace entire repo content with code from /root/shahikitchen-google/

This commit is contained in:
root
2026-07-03 02:51:15 +00:00
parent c8b7dc95e4
commit 8ccf033329
79 changed files with 7611 additions and 439 deletions
+33
View File
@@ -0,0 +1,33 @@
import type { Language } from '@/domain/language/entities';
import { getTranslation, type TranslationBundle } from '@/presentation/i18n/translations';
import type { CartInquiryCopy } from '@/application/messaging/whatsapp-message-builder';
/** WhatsApp inquiries are sent in Swedish or English only — never other UI languages. */
export type WhatsAppInquiryLanguage = 'sv' | 'en';
export function getWhatsAppInquiryLanguage(language: Language): WhatsAppInquiryLanguage {
return language === 'sv' ? 'sv' : 'en';
}
export function getWhatsAppInquiryTranslation(language: Language): TranslationBundle {
return getTranslation(getWhatsAppInquiryLanguage(language));
}
export function buildCartInquiryCopy(t: TranslationBundle): CartInquiryCopy {
return {
pickupIntro: t.cartDrawer.inquiryPickupIntro,
deliveryIntro: t.cartDrawer.inquiryDeliveryIntro,
messageTotal: t.cartDrawer.messageTotal,
messageName: t.cartDrawer.messageName,
messageEmail: t.cartDrawer.messageEmail,
messageBranch: t.cartDrawer.messageBranch,
branchAskim: t.cartDrawer.branchAskim,
branchBackaplan: t.cartDrawer.branchBackaplan,
messageAddress: t.cartDrawer.messageAddress,
messagePreferredDate: t.cartDrawer.messagePreferredDate,
messagePreferredTime: t.cartDrawer.messagePreferredTime,
scheduleDateToday: t.cartDrawer.dateToday,
scheduleDateTomorrow: t.cartDrawer.dateTomorrow,
deliverySwishNote: t.cartDrawer.deliverySwishNote,
};
}