/** * Client-side embed snippets (updates instantly while editing). * Sizing is responsive — no manual width/height needed. */ export function buildCtaEmbedCodes({ publicId, name, origin }) { if (!publicId) { return { embed_iframe: '', embed_script: '' }; } const base = origin || (typeof window !== 'undefined' ? window.location.origin : ''); const title = (name || 'Form').replace(/"/g, '"'); const iframeStyle = 'width:100%;max-width:100%;border:none;border-radius:12px;display:block;min-height:280px;'; return { embed_iframe: ``, embed_script: `
\n`, }; }