{"version":3,"file":"SafeArea.cjs","names":[],"sources":["../../../src/components/SafeArea/SafeArea.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport styles from \"./SafeArea.module.css\";\n\nexport type SafeAreaEdge = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nexport interface SafeAreaProps extends HTMLAttributes<HTMLDivElement> {\n    /** Edges to pad. Default `[\"top\",\"right\",\"bottom\",\"left\"]` (all). */\n    edges?: SafeAreaEdge[];\n    /** Render as inline (use `display: contents`). */\n    inline?: boolean;\n    children?: ReactNode;\n}\n\nconst ALL_EDGES: SafeAreaEdge[] = [\"top\", \"right\", \"bottom\", \"left\"];\n\n/**\n * Apply `env(safe-area-inset-*)` padding so content avoids iOS notch /\n * Android navbar / device chrome. Wrap the outermost container of pages\n * with sticky headers/footers.\n *\n * @example\n * <SafeArea edges={[\"top\"]}>\n *     <Navbar />\n * </SafeArea>\n */\nexport function SafeArea({\n    edges = ALL_EDGES,\n    inline = false,\n    className,\n    children,\n    ...props\n}: SafeAreaProps) {\n    return (\n        <div\n            className={cn(\n                styles.safe,\n                inline && styles.inline,\n                edges.includes(\"top\") && styles.top,\n                edges.includes(\"right\") && styles.right,\n                edges.includes(\"bottom\") && styles.bottom,\n                edges.includes(\"left\") && styles.left,\n                className,\n            )}\n            data-edges={edges.join(\" \")}\n            {...props}\n        >\n            {children}\n        </div>\n    );\n}\n"],"mappings":"4GAcA,IAAM,EAA4B,CAAC,MAAO,QAAS,SAAU,MAAM,EAYnE,SAAgB,EAAS,CACrB,QAAQ,EACR,SAAS,GACT,YACA,WACA,GAAG,GACW,CACd,OACI,EAAA,EAAA,IAAA,CAAC,MAAD,CACI,UAAW,EAAA,GACP,EAAA,QAAO,KACP,GAAU,EAAA,QAAO,OACjB,EAAM,SAAS,KAAK,GAAK,EAAA,QAAO,IAChC,EAAM,SAAS,OAAO,GAAK,EAAA,QAAO,MAClC,EAAM,SAAS,QAAQ,GAAK,EAAA,QAAO,OACnC,EAAM,SAAS,MAAM,GAAK,EAAA,QAAO,KACjC,CACJ,EACA,aAAY,EAAM,KAAK,GAAG,EAC1B,GAAI,EAEH,UACA,CAAA,CAEb"}