import * as React from "react"; import Svg, { Path, Rect, Circle, G, Text, Image, } from "react-native-svg"; import { type QrTemplateProps, getFontFamily, renderSvgLines } from "./index"; const QrTemplateLumiere = ({ qrBase64, fields, ...props }: QrTemplateProps) => { const rName = fields?.restaurantName; const sub = fields?.subtitle; const table = fields?.tableNo; const cta = fields?.ctaText; const wifi = fields?.wifiText; const social = fields?.socialText; const rNameFont = getFontFamily(rName?.fontId, "Georgia, 'Playfair Display', serif"); const subFont = getFontFamily(sub?.fontId, "System, -apple-system, Roboto, sans-serif"); const ctaFont = getFontFamily(cta?.fontId, "Georgia, 'Playfair Display', serif"); const infoFont = getFontFamily(wifi?.fontId, "System, -apple-system, Roboto, sans-serif"); return ( {/* Köşe süslemeleri */} {/* Merkez amblem */} {/* Yatay çizgi */} {/* QR Placeholder / Gerçek QR */} {qrBase64 ? ( ) : ( <> {"QR KOD ALANI"} )} {/* Metinler (Çok satırlı ve bağımsız font destekli) */} {/* Restoran Adı */} {rName?.visible !== false && renderSvgLines({ text: rName?.text || "LUMIÈRE", x: 300, y: 148, offsetY: rName?.offsetY, fill: "#d4af37", fontFamily: rNameFont, fontSize: rName?.fontSize || 30, fontWeight: "bold", letterSpacing: 4, })} {/* Slogan / Alt Başlık (Enter ile alt satıra geçebilir) */} {sub?.visible !== false && renderSvgLines({ text: sub?.text || "RESTAURANT & BAR | MODERN CUISINE", x: 300, y: 178, offsetY: sub?.offsetY, fill: "#e5c378", fontFamily: subFont, fontSize: sub?.fontSize || 11, fontWeight: 600, letterSpacing: 2.5, })} {/* CTA */} {cta?.visible !== false && renderSvgLines({ text: cta?.text || "MENÜYÜ GÖRMEK İÇİN OKUTUN", x: 300, y: 472, offsetY: cta?.offsetY, fill: "#d4af37", fontFamily: ctaFont, fontSize: cta?.fontSize || 13, fontWeight: "bold", letterSpacing: 2, })} {/* Sosyal Medya / İletişim */} {social?.visible !== false && renderSvgLines({ text: social?.text || "Rezervasyon: 0212 555 0199", x: 300, y: 504, offsetY: social?.offsetY, fill: "#e2ddd2", fontFamily: infoFont, fontSize: social?.fontSize || 10.5, fontWeight: 500, letterSpacing: 1, })} {/* Masa No & WiFi */} {(table?.visible !== false || wifi?.visible !== false) && renderSvgLines({ text: [ table?.visible !== false && table?.text ? table.text : "", wifi?.visible !== false && wifi?.text ? wifi.text : "", ] .filter(Boolean) .join(" • "), x: 300, y: 526, offsetY: table?.offsetY || wifi?.offsetY, fill: "#c5a059", fontFamily: infoFont, fontSize: table?.fontSize || wifi?.fontSize || 10, fontWeight: 600, letterSpacing: 1, })} ); }; export default QrTemplateLumiere;