!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("react")):"function"==typeof define&&define.amd?define(["react"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).index=o(e.react)}(this,(function(e){"use strict";return function({apiKey:o,alwaysOpen:t,noFastMode:n}){return e.useLayoutEffect((()=>{const e=window?.document?.getElementById?.("__cookbook");if(!window?.document||e)return;const d=window.document.createElement("div");d.id="__cookbook",d.setAttribute("data-api-key",o),t&&d.setAttribute("data-always-open",""),n&&d.setAttribute("data-no-fast",""),window.document.body.appendChild(d);const i=window.document.createElement("script");return i.src="https://cdn.jsdelivr.net/npm/@cookbookdev/docsbot/dist/standalone/index.cjs.js",i.defer=!0,document.head.appendChild(i),()=>{try{if(!window?.document)return;window.document.body&&window.document.body.contains(d)&&window.document.body.removeChild(d),window.document.head&&window.document.head.contains(i)&&window.document.head.removeChild(i)}catch(e){console.error("error while cleaning up AskCookbook",e)}}}),[]),null}}));
