export const studioHelpScript = `window.addEventListener("error",function(){var s=document.getElementById("validation-state"),d=document.getElementById("diagnostics");if(s&&s.textContent==="Checking"){s.textContent="Editor could not start";if(d)d.textContent="Reload the page. If this continues, rebuild and restart the site with the latest Studio configuration. Your saved draft has not been deleted.";}});document.addEventListener("DOMContentLoaded",function(){var b=document.querySelector('[data-tab="guided"]');if(b)b.click();});`; export function addStudioGuide(html: string, configured: boolean) { const guide = `
How to use Design Studio
  1. Describe your website. Open Guided design, enter your product and audience, then choose colors, shapes and spacing with Next.
  2. Generate and compare. Click Generate three directions, review an alternative, then choose Use reviewed proposal.
  3. Refine it. Try “make buttons square and use blue as the primary color” under Edit with words. Lock decisions you want to keep.
  4. Use it in your app. Open Review & apply and export Theme config or Compiled CSS. This website previews and exports designs; it does not change your deployed app automatically.

${configured ? "APIMart AI is enabled with gpt-6-luna. Generation sends your brief and current design to APIMart only when you request it." : "AI is not configured. Local presets and supported rule-based edits still work. Set APIMART_API_KEY in the server .env and restart to enable gpt-6-luna."}

`; return html .replace( '