(function attachSchemaInstallGuide(global) {
  const React = global.React;
  if (!React) return;

  function SchemaInstallGuide({ schema }) {
    const snippets = schema && schema.installSnippets;
    if (!schema || !snippets) return <div className="free-seo-card"><h3>Install guide</h3><p>Select a generated schema to view install snippets.</p></div>;
    return <div className="free-seo-card"><h3>Install guide</h3><p>Target: {snippets.target}</p><details open><summary>Generic HTML</summary><pre>{snippets.html}</pre></details><details><summary>WordPress</summary><pre>{snippets.wordpress}</pre></details><details><summary>Shopify</summary><pre>{snippets.shopify}</pre></details><details><summary>Webflow</summary><pre>{snippets.webflow}</pre></details><details><summary>Wix</summary><pre>{snippets.wix}</pre></details></div>;
  }

  global.SchemaInstallGuide = SchemaInstallGuide;
})(window);
