{"version":3,"file":"MobileActionSheet-BdkbQAiW.mjs","names":[],"sources":["../../../platform/ui-components/src/components/MobileActionSheet.tsx"],"sourcesContent":["import type React from \"react\";\nimport { Check } from \"lucide-react\";\nimport { Button, cn } from \"@fluid-app/ui-primitives\";\nimport { MobileBottomSheet } from \"./MobileBottomSheet\";\n\ntype MobileActionSheetAction = {\n  id: string;\n  label: string;\n  onSelect: () => void;\n  disabled?: boolean;\n  selected?: boolean;\n  variant?: \"default\" | \"destructive\";\n};\n\ntype MobileActionSheetProps = {\n  open: boolean;\n  onOpenChange: (open: boolean) => void;\n  title: React.ReactNode;\n  actions: readonly MobileActionSheetAction[];\n};\n\nexport type { MobileActionSheetAction, MobileActionSheetProps };\n\nexport function MobileActionSheet({\n  open,\n  onOpenChange,\n  title,\n  actions,\n}: MobileActionSheetProps): React.JSX.Element {\n  return (\n    <MobileBottomSheet open={open} onOpenChange={onOpenChange} title={title}>\n      <div\n        aria-hidden=\"true\"\n        className=\"border-border -mr-[max(0.5rem,env(safe-area-inset-right))] -ml-[max(0.5rem,env(safe-area-inset-left))] border-t\"\n      />\n      <div className=\"divide-border/50 border-border/50 divide-y border-b\">\n        {actions.map((action) => (\n          <Button\n            key={action.id}\n            type=\"button\"\n            variant=\"ghost\"\n            disabled={action.disabled}\n            aria-pressed={action.selected}\n            className={cn(\n              \"h-13 w-full justify-start rounded-none px-4 text-base font-medium\",\n              action.variant === \"destructive\" &&\n                \"text-destructive hover:bg-destructive/10 hover:text-destructive focus-visible:ring-destructive/20\",\n            )}\n            onClick={() => {\n              action.onSelect();\n              onOpenChange(false);\n            }}\n          >\n            <span className=\"flex-1 text-left\">{action.label}</span>\n            {action.selected ? (\n              <Check\n                aria-hidden=\"true\"\n                className=\"text-muted-foreground size-4\"\n              />\n            ) : null}\n          </Button>\n        ))}\n      </div>\n    </MobileBottomSheet>\n  );\n}\n"],"mappings":";;;;;AAuBA,SAAgB,kBAAkB,EAChC,MACA,cACA,OACA,WAC4C;AAC5C,QACE,qBAAC,mBAAD;EAAyB;EAAoB;EAAqB;YAAlE,CACE,oBAAC,OAAD;GACE,eAAY;GACZ,WAAU;GACV,CAAA,EACF,oBAAC,OAAD;GAAK,WAAU;aACZ,QAAQ,KAAK,WACZ,qBAAC,QAAD;IAEE,MAAK;IACL,SAAQ;IACR,UAAU,OAAO;IACjB,gBAAc,OAAO;IACrB,WAAW,GACT,qEACA,OAAO,YAAY,iBACjB,oGACH;IACD,eAAe;AACb,YAAO,UAAU;AACjB,kBAAa,MAAM;;cAbvB,CAgBE,oBAAC,QAAD;KAAM,WAAU;eAAoB,OAAO;KAAa,CAAA,EACvD,OAAO,WACN,oBAAC,OAAD;KACE,eAAY;KACZ,WAAU;KACV,CAAA,GACA,KACG;MAtBF,OAAO,GAsBL,CACT;GACE,CAAA,CACY"}