({ vertexCount, onSave, onCancel, onUndo }: MobileDrawPromptProps)
| 8 | } |
| 9 | |
| 10 | const MobileDrawPrompt = ({ vertexCount, onSave, onCancel, onUndo }: MobileDrawPromptProps) => { |
| 11 | return ( |
| 12 | <div className="absolute bottom-20 left-4 right-4 z-20 animate-fade-in"> |
| 13 | <div className="bg-card/90 backdrop-blur-xl rounded-2xl border border-border/60 shadow-lg shadow-black/20 p-4 space-y-3"> |
| 14 | <div className="flex items-center gap-2"> |
| 15 | <span className="w-2 h-2 rounded-full animate-pulse" style={{ backgroundColor: "#EAB947" }} /> |
| 16 | <span className="text-sm font-medium text-foreground">Drawing Mode</span> |
| 17 | <span className="ml-auto text-xs text-muted-foreground">{vertexCount} point{vertexCount !== 1 ? "s" : ""}</span> |
| 18 | </div> |
| 19 | <p className="text-xs text-muted-foreground">Tap on the map to add boundary points</p> |
| 20 | <div className="flex gap-3"> |
| 21 | <button |
| 22 | onClick={onCancel} |
| 23 | className="flex-1 flex items-center justify-center gap-1.5 py-2.5 rounded-xl border border-border text-sm text-foreground hover:bg-accent transition-colors" |
| 24 | > |
| 25 | <X className="w-4 h-4" /> Cancel |
| 26 | </button> |
| 27 | {onUndo && ( |
| 28 | <button |
| 29 | onClick={onUndo} |
| 30 | disabled={vertexCount === 0} |
| 31 | className="flex items-center justify-center gap-1.5 py-2.5 px-4 rounded-xl border border-border text-sm text-foreground hover:bg-accent transition-colors disabled:opacity-40" |
| 32 | > |
| 33 | <Undo2 className="w-4 h-4" /> |
| 34 | </button> |
| 35 | )} |
| 36 | <button |
| 37 | onClick={onSave} |
| 38 | disabled={vertexCount < 3} |
| 39 | className="flex-1 flex items-center justify-center gap-1.5 py-2.5 rounded-xl text-sm font-medium transition-colors bg-primary text-primary-foreground disabled:opacity-40" |
| 40 | > |
| 41 | <Check className="w-4 h-4" /> Save |
| 42 | </button> |
| 43 | </div> |
| 44 | </div> |
| 45 | </div> |
| 46 | ); |
| 47 | }; |
| 48 | |
| 49 | export default MobileDrawPrompt; |
nothing calls this directly
no outgoing calls
no test coverage detected