{"version":3,"file":"install-hints.cjs","names":[],"sources":["../../../src/components/InstallButton/install-hints.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport type { InstallMethod } from \"@/hooks/use-install-prompt\";\n\n/** What an install affordance needs to render the instruction for a method. */\nexport interface InstallHintInput {\n    /** The strategy `useInstallPrompt` resolved. */\n    method: InstallMethod;\n    /** An `intent://` URL that re-opens the page in Chrome on Android, if any. */\n    openInChromeIntent: string | null;\n}\n\n/** Renders the instruction shown when the browser has no install prompt. */\nexport type RenderInstallHint = (input: InstallHintInput) => ReactNode;\n\n/**\n * The default instruction for a browser that cannot be prompted.\n *\n * Written out rather than left to the app because every app wrote the same two\n * sentences, and getting them wrong is invisible: an iOS user who is told to\n * look for an \"Install\" menu never finds one, because Safari puts it behind the\n * Share sheet.\n *\n * On an Android fork the copy also offers the `intent://` link the SDK already\n * builds — reopening the page in Chrome is the only path that reaches a real\n * install on a browser whose menu has no install entry at all.\n *\n * @param input - The resolved method and the optional Chrome intent.\n * @returns The instruction, or `null` when the method needs none.\n */\nexport function defaultInstallHint({ method, openInChromeIntent }: InstallHintInput): ReactNode {\n    if (method === \"ios\") {\n        return (\n            <>\n                Toque em <strong>Compartilhar</strong> e escolha{\" \"}\n                <strong>Adicionar à Tela de Início</strong>.\n            </>\n        );\n    }\n    if (method === \"manual\") {\n        return (\n            <>\n                Abra o menu do navegador (<strong>⋮</strong>) e escolha{\" \"}\n                <strong>Instalar app</strong>.\n                {openInChromeIntent ? (\n                    <>\n                        {\" \"}\n                        Se não houver essa opção, <a href={openInChromeIntent}>abra no Chrome</a>.\n                    </>\n                ) : null}\n            </>\n        );\n    }\n    return null;\n}\n"],"mappings":"mCA8BA,SAAgB,EAAmB,CAAE,SAAQ,sBAAmD,CAuB5F,OAtBI,IAAW,OAEP,EAAA,EAAA,KAAA,CAAA,EAAA,SAAA,CAAA,SAAA,CAAE,aACW,EAAA,EAAA,IAAA,CAAC,SAAD,CAAA,SAAQ,cAAoB,CAAA,EAAC,aAAW,KACjD,EAAA,EAAA,IAAA,CAAC,SAAD,CAAA,SAAQ,4BAAkC,CAAA,EAAC,GAC7C,CAAA,CAAA,EAGN,IAAW,UAEP,EAAA,EAAA,KAAA,CAAA,EAAA,SAAA,CAAA,SAAA,CAAE,8BAC4B,EAAA,EAAA,IAAA,CAAC,SAAD,CAAA,SAAQ,GAAS,CAAA,EAAC,cAAY,KACxD,EAAA,EAAA,IAAA,CAAC,SAAD,CAAA,SAAQ,cAAoB,CAAA,EAAC,IAC5B,GACG,EAAA,EAAA,KAAA,CAAA,EAAA,SAAA,CAAA,SAAA,CACK,IAAI,8BACqB,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,KAAM,EAAoB,SAAA,gBAAiB,CAAA,EAAC,GAC3E,CAAA,CAAA,EACF,IACN,CAAA,CAAA,EAGH,IACX"}