@lincros-ui/components 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React36 from 'react';
2
2
  import React36__default, { memo, useCallback, useMemo, useState, useRef, useEffect } from 'react';
3
3
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
4
- import { ChevronDown, ArrowLeft, ArrowRight, Check, X, Search, ChevronRight, Circle, Minimize2, Maximize2, Dot, ChevronUp, PanelLeft, AlertTriangle, Users, Shield, RefreshCw, Home, ExternalLink, Clock, AlertCircle, CheckCircle, LogIn, Server, Key, MoreHorizontal, ChevronLeft, Phone, Video, Info, MoreVertical, Paperclip, Smile, Mic, Send, GripVertical, Filter, ChevronsLeft, ChevronsRight, Bold, Italic, List, ListOrdered, Quote, Code, Link2 as Link2$1, Image, Plus, Copy, Play, Pause, Square, RotateCcw, Edit, Trash2, History, Loader2, CircleSlash, CircleDot, HelpCircle, Bug, StepForward, CornerDownRight, Settings, Brain, Bot, FileJson, XCircle, PauseCircle, GitBranch, Split, Layers, Gauge, PlayCircle, MessageSquare, Database, Variable, Activity, Lightbulb, CheckCircle2, Upload, Download, Hash, StopCircle, Terminal, FileText, BarChart3, Expand, Coins, Wrench, Sparkles, Eye, Save, Inbox, TrendingUp, TrendingDown, TestTube, MessageCircle, Merge, ChevronsDownUp, ChevronsUpDown, PanelLeftClose, Unlock, Lock, Zap, Network, Timer, Workflow, QrCode, User, GitMerge, Tag, Globe, Link as Link$1, Building, Box, Wifi, WifiOff, ToggleLeft, Type, Building2, DollarSign, Mail, File, MapPin, CheckCheck, EyeOff } from 'lucide-react';
4
+ import { ChevronDown, ArrowLeft, ArrowRight, Check, X, Search, ChevronRight, Circle, Minimize2, Maximize2, Dot, ChevronUp, PanelLeft, AlertTriangle, Users, Shield, RefreshCw, Home, ExternalLink, Clock, AlertCircle, CheckCircle, LogIn, Server, Key, MoreHorizontal, ChevronLeft, Phone, Video, Info, MoreVertical, Paperclip, Smile, Mic, Send, GripVertical, Bot, User, Building2, UserCheck, ClipboardList, ChevronsLeft, ChevronsRight, Bold, Italic, List, ListOrdered, Quote, Code, Link2 as Link2$1, Image, Plus, LayoutGrid, MessageSquare, ChevronsUpDown, Copy, Play, Pause, Square, RotateCcw, Edit, Trash2, History, Loader2, CircleSlash, CircleDot, HelpCircle, Bug, StepForward, CornerDownRight, Settings, Brain, FileJson, XCircle, PauseCircle, GitBranch, Split, Layers, Gauge, PlayCircle, Database, Variable, Activity, Lightbulb, CheckCircle2, Upload, Download, Hash, StopCircle, Terminal, FileText, Filter, BarChart3, Expand, Coins, Wrench, Sparkles, Eye, Save, Inbox, TrendingUp, TrendingDown, TestTube, MessageCircle, Merge, ChevronsDownUp, PanelLeftClose, Unlock, Lock, Zap, Network, Timer, Workflow, QrCode, GitMerge, Tag, Globe, Link as Link$1, Building, Box, Wifi, WifiOff, ToggleLeft, Type, DollarSign, Mail, Monitor, Navigation, Bell, UserCog, Car, LogOut, File, MapPin, CheckCheck, EyeOff } from 'lucide-react';
5
5
  import { clsx } from 'clsx';
6
6
  import { twMerge } from 'tailwind-merge';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -85,6 +85,7 @@ import { useWhatsAppStore } from '@/presentation/stores/whatsapp.store';
85
85
  import { whatsappService } from '@/services/api/whatsapp.service';
86
86
  import QRCode from 'qrcode';
87
87
  import { formatInTimeZone } from 'date-fns-tz';
88
+ import { MenuPermissionLevel, canAccessMenu } from '@/lib/menu-permissions';
88
89
 
89
90
  // src/components/ui/accordion.tsx
90
91
  function cn(...inputs) {
@@ -4482,6 +4483,500 @@ var toastHelpers = {
4482
4483
  }
4483
4484
  };
4484
4485
  Object.assign(toast, toastHelpers);
4486
+ var FilterBar = ({ onFilterChange, filters, operators, taskTypes, businessUnits }) => {
4487
+ const [openPopovers, setOpenPopovers] = useState({
4488
+ businessUnits: false,
4489
+ operators: false,
4490
+ taskTypes: false,
4491
+ status: false
4492
+ });
4493
+ const statusOptions = [
4494
+ { value: "pending", label: "Pendente" },
4495
+ { value: "in-progress", label: "Em Andamento (IA)" },
4496
+ { value: "human-interaction", label: "Em Andamento (Humano)" },
4497
+ { value: "completed", label: "Conclu\xEDdo" },
4498
+ { value: "alert", label: "Precisam de Intera\xE7\xE3o" }
4499
+ ];
4500
+ const updateFilter = (key, value) => {
4501
+ const newFilters = { ...filters, [key]: value };
4502
+ onFilterChange(newFilters);
4503
+ };
4504
+ const clearFilter = (key) => {
4505
+ if (key === "vehicleId" || key === "operatorType") {
4506
+ updateFilter(key, "");
4507
+ } else if (key === "status") {
4508
+ updateFilter(key, ["pending", "in-progress", "human-interaction"]);
4509
+ } else {
4510
+ updateFilter(key, []);
4511
+ }
4512
+ };
4513
+ const clearAllFilters = () => {
4514
+ const emptyFilters = {
4515
+ vehicleId: "",
4516
+ operators: [],
4517
+ taskTypes: [],
4518
+ businessUnits: [],
4519
+ operatorType: "",
4520
+ status: ["pending", "in-progress"],
4521
+ // Manter padrão ao limpar tudo
4522
+ startDate: "",
4523
+ endDate: ""
4524
+ };
4525
+ onFilterChange(emptyFilters);
4526
+ setOpenPopovers({ businessUnits: false, operators: false, taskTypes: false, status: false });
4527
+ };
4528
+ const toggleArrayFilter = (key, value) => {
4529
+ const currentArray = filters[key];
4530
+ const newArray = currentArray.includes(value) ? currentArray.filter((item) => item !== value) : [...currentArray, value];
4531
+ updateFilter(key, newArray);
4532
+ };
4533
+ const activeFiltersCount = [
4534
+ filters.vehicleId,
4535
+ filters.operatorType,
4536
+ filters.startDate,
4537
+ filters.endDate,
4538
+ ...filters.operators,
4539
+ ...filters.taskTypes,
4540
+ ...filters.businessUnits,
4541
+ // Não contar status como filtro ativo se for o padrão
4542
+ ...JSON.stringify([...filters.status].sort()) !== JSON.stringify(["human-interaction", "in-progress", "pending"]) ? filters.status : []
4543
+ ].filter((value) => value !== "").length;
4544
+ return /* @__PURE__ */ jsxs("div", { className: "bg-white border-b border-gray-200 p-4 space-y-4", children: [
4545
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
4546
+ /* @__PURE__ */ jsx("div", { className: "relative flex-shrink-0", children: /* @__PURE__ */ jsx(
4547
+ Input,
4548
+ {
4549
+ placeholder: "Buscar por placa...",
4550
+ value: filters.vehicleId,
4551
+ onChange: (e) => updateFilter("vehicleId", e.target.value),
4552
+ leftIcon: /* @__PURE__ */ jsx(Search, { className: "w-4 h-4" }),
4553
+ rightIcon: filters.vehicleId ? /* @__PURE__ */ jsx(
4554
+ Button,
4555
+ {
4556
+ variant: "ghost",
4557
+ size: "sm",
4558
+ onClick: () => clearFilter("vehicleId"),
4559
+ className: "h-6 w-6 p-0 hover:bg-gray-100 -mr-2",
4560
+ children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
4561
+ }
4562
+ ) : void 0,
4563
+ className: "w-48",
4564
+ showValidationIcon: false
4565
+ }
4566
+ ) }),
4567
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
4568
+ /* @__PURE__ */ jsx(
4569
+ Input,
4570
+ {
4571
+ type: "date",
4572
+ placeholder: "Data inicial",
4573
+ value: filters.startDate,
4574
+ onChange: (e) => updateFilter("startDate", e.target.value),
4575
+ className: "w-30 h-10 px-3"
4576
+ }
4577
+ ),
4578
+ /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: "at\xE9" }),
4579
+ /* @__PURE__ */ jsx(
4580
+ Input,
4581
+ {
4582
+ type: "date",
4583
+ placeholder: "Data final",
4584
+ value: filters.endDate,
4585
+ onChange: (e) => updateFilter("endDate", e.target.value),
4586
+ className: "w-30 h-10 px-3"
4587
+ }
4588
+ ),
4589
+ (filters.startDate || filters.endDate) && /* @__PURE__ */ jsx(
4590
+ Button,
4591
+ {
4592
+ variant: "ghost",
4593
+ size: "sm",
4594
+ onClick: () => {
4595
+ clearFilter("startDate");
4596
+ clearFilter("endDate");
4597
+ },
4598
+ className: "h-6 w-6 p-0 hover:bg-gray-100 flex items-center justify-center ml-0",
4599
+ children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
4600
+ }
4601
+ )
4602
+ ] }),
4603
+ /* @__PURE__ */ jsx(Separator5, { orientation: "vertical", className: "h-8" }),
4604
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
4605
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-gray-700", children: "Tipo:" }),
4606
+ /* @__PURE__ */ jsxs(
4607
+ ToggleGroup,
4608
+ {
4609
+ type: "single",
4610
+ value: filters.operatorType,
4611
+ onValueChange: (value) => updateFilter("operatorType", value || ""),
4612
+ className: "border rounded-md p-0.5 h-10",
4613
+ children: [
4614
+ /* @__PURE__ */ jsxs(ToggleGroupItem, { value: "ia", className: "flex items-center gap-1 text-xs h-9", children: [
4615
+ /* @__PURE__ */ jsx(Bot, { className: "w-3 h-3" }),
4616
+ "IA"
4617
+ ] }),
4618
+ /* @__PURE__ */ jsxs(ToggleGroupItem, { value: "humano", className: "flex items-center gap-1 text-xs h-9", children: [
4619
+ /* @__PURE__ */ jsx(User, { className: "w-3 h-3" }),
4620
+ "Humano"
4621
+ ] })
4622
+ ]
4623
+ }
4624
+ )
4625
+ ] }),
4626
+ /* @__PURE__ */ jsx(Separator5, { orientation: "vertical", className: "h-8" }),
4627
+ /* @__PURE__ */ jsxs(
4628
+ Popover,
4629
+ {
4630
+ open: openPopovers.status,
4631
+ onOpenChange: (open) => setOpenPopovers((prev) => ({ ...prev, status: open })),
4632
+ children: [
4633
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "relative h-10", children: [
4634
+ /* @__PURE__ */ jsx(AlertCircle, { className: "w-4 h-4 mr-2" }),
4635
+ "Status",
4636
+ filters.status.length > 0 && /* @__PURE__ */ jsx(Badge, { variant: "destructive", className: "ml-2 h-5 w-5 p-0 text-xs flex items-center justify-center", children: filters.status.length })
4637
+ ] }) }),
4638
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-4 bg-white border shadow-lg", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
4639
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
4640
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-800", children: "Status" }),
4641
+ /* @__PURE__ */ jsx(
4642
+ Button,
4643
+ {
4644
+ variant: "ghost",
4645
+ size: "sm",
4646
+ onClick: () => clearFilter("status"),
4647
+ className: "text-gray-500 hover:text-gray-700",
4648
+ children: "Padr\xE3o"
4649
+ }
4650
+ )
4651
+ ] }),
4652
+ /* @__PURE__ */ jsx("div", { className: "max-h-60 overflow-y-auto space-y-2", children: statusOptions.map((status) => /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
4653
+ /* @__PURE__ */ jsx(
4654
+ Checkbox,
4655
+ {
4656
+ id: `status-${status.value}`,
4657
+ checked: filters.status.includes(status.value),
4658
+ onCheckedChange: () => toggleArrayFilter("status", status.value)
4659
+ }
4660
+ ),
4661
+ /* @__PURE__ */ jsx(
4662
+ "label",
4663
+ {
4664
+ htmlFor: `status-${status.value}`,
4665
+ className: "text-sm cursor-pointer flex-1",
4666
+ children: status.label
4667
+ }
4668
+ )
4669
+ ] }, status.value)) })
4670
+ ] }) })
4671
+ ]
4672
+ }
4673
+ ),
4674
+ /* @__PURE__ */ jsxs(
4675
+ Popover,
4676
+ {
4677
+ open: openPopovers.businessUnits,
4678
+ onOpenChange: (open) => setOpenPopovers((prev) => ({ ...prev, businessUnits: open })),
4679
+ children: [
4680
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "relative h-10", children: [
4681
+ /* @__PURE__ */ jsx(Building2, { className: "w-4 h-4 mr-2" }),
4682
+ "Unidades",
4683
+ filters.businessUnits.length > 0 && /* @__PURE__ */ jsx(Badge, { variant: "destructive", className: "ml-2 h-5 w-5 p-0 text-xs flex items-center justify-center", children: filters.businessUnits.length })
4684
+ ] }) }),
4685
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-4 bg-white border shadow-lg", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
4686
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
4687
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-800", children: "Unidades de Neg\xF3cio" }),
4688
+ filters.businessUnits.length > 0 && /* @__PURE__ */ jsx(
4689
+ Button,
4690
+ {
4691
+ variant: "ghost",
4692
+ size: "sm",
4693
+ onClick: () => clearFilter("businessUnits"),
4694
+ className: "text-gray-500 hover:text-gray-700",
4695
+ children: "Limpar"
4696
+ }
4697
+ )
4698
+ ] }),
4699
+ /* @__PURE__ */ jsx("div", { className: "max-h-60 overflow-y-auto space-y-2", children: businessUnits.map((unit) => /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
4700
+ /* @__PURE__ */ jsx(
4701
+ Checkbox,
4702
+ {
4703
+ id: `unit-${unit.codigo}`,
4704
+ checked: filters.businessUnits.includes(unit.codigo),
4705
+ onCheckedChange: () => toggleArrayFilter("businessUnits", unit.codigo)
4706
+ }
4707
+ ),
4708
+ /* @__PURE__ */ jsx(
4709
+ "label",
4710
+ {
4711
+ htmlFor: `unit-${unit.codigo}`,
4712
+ className: "text-sm cursor-pointer flex-1",
4713
+ children: unit.descricao
4714
+ }
4715
+ )
4716
+ ] }, unit.codigo)) })
4717
+ ] }) })
4718
+ ]
4719
+ }
4720
+ ),
4721
+ /* @__PURE__ */ jsxs(
4722
+ Popover,
4723
+ {
4724
+ open: openPopovers.operators,
4725
+ onOpenChange: (open) => setOpenPopovers((prev) => ({ ...prev, operators: open })),
4726
+ children: [
4727
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "relative h-10", children: [
4728
+ /* @__PURE__ */ jsx(UserCheck, { className: "w-4 h-4 mr-2" }),
4729
+ "Usu\xE1rios",
4730
+ filters.operators.length > 0 && /* @__PURE__ */ jsx(Badge, { variant: "destructive", className: "ml-2 h-5 w-5 p-0 text-xs flex items-center justify-center", children: filters.operators.length })
4731
+ ] }) }),
4732
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-4 bg-white border shadow-lg", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
4733
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
4734
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-800", children: "Usu\xE1rios" }),
4735
+ filters.operators.length > 0 && /* @__PURE__ */ jsx(
4736
+ Button,
4737
+ {
4738
+ variant: "ghost",
4739
+ size: "sm",
4740
+ onClick: () => clearFilter("operators"),
4741
+ className: "text-gray-500 hover:text-gray-700",
4742
+ children: "Limpar"
4743
+ }
4744
+ )
4745
+ ] }),
4746
+ /* @__PURE__ */ jsx("div", { className: "max-h-60 overflow-y-auto space-y-2", children: operators.map((operator) => /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
4747
+ /* @__PURE__ */ jsx(
4748
+ Checkbox,
4749
+ {
4750
+ id: `operator-${operator}`,
4751
+ checked: filters.operators.includes(operator),
4752
+ onCheckedChange: () => toggleArrayFilter("operators", operator)
4753
+ }
4754
+ ),
4755
+ /* @__PURE__ */ jsx(
4756
+ "label",
4757
+ {
4758
+ htmlFor: `operator-${operator}`,
4759
+ className: "text-sm cursor-pointer flex-1",
4760
+ children: operator
4761
+ }
4762
+ )
4763
+ ] }, operator)) })
4764
+ ] }) })
4765
+ ]
4766
+ }
4767
+ ),
4768
+ /* @__PURE__ */ jsxs(
4769
+ Popover,
4770
+ {
4771
+ open: openPopovers.taskTypes,
4772
+ onOpenChange: (open) => setOpenPopovers((prev) => ({ ...prev, taskTypes: open })),
4773
+ children: [
4774
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "relative h-10", children: [
4775
+ /* @__PURE__ */ jsx(ClipboardList, { className: "w-4 h-4 mr-2" }),
4776
+ "Tipos de Tarefa",
4777
+ filters.taskTypes.length > 0 && /* @__PURE__ */ jsx(Badge, { variant: "destructive", className: "ml-2 h-5 w-5 p-0 text-xs flex items-center justify-center", children: filters.taskTypes.length })
4778
+ ] }) }),
4779
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-4 bg-white border shadow-lg", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
4780
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
4781
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-800", children: "Tipos de Tarefa" }),
4782
+ filters.taskTypes.length > 0 && /* @__PURE__ */ jsx(
4783
+ Button,
4784
+ {
4785
+ variant: "ghost",
4786
+ size: "sm",
4787
+ onClick: () => clearFilter("taskTypes"),
4788
+ className: "text-gray-500 hover:text-gray-700",
4789
+ children: "Limpar"
4790
+ }
4791
+ )
4792
+ ] }),
4793
+ /* @__PURE__ */ jsx("div", { className: "max-h-60 overflow-y-auto space-y-2", children: taskTypes.map((taskType) => /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
4794
+ /* @__PURE__ */ jsx(
4795
+ Checkbox,
4796
+ {
4797
+ id: `task-${taskType}`,
4798
+ checked: filters.taskTypes.includes(taskType),
4799
+ onCheckedChange: () => toggleArrayFilter("taskTypes", taskType)
4800
+ }
4801
+ ),
4802
+ /* @__PURE__ */ jsx(
4803
+ "label",
4804
+ {
4805
+ htmlFor: `task-${taskType}`,
4806
+ className: "text-sm cursor-pointer flex-1",
4807
+ children: taskType
4808
+ }
4809
+ )
4810
+ ] }, taskType)) })
4811
+ ] }) })
4812
+ ]
4813
+ }
4814
+ ),
4815
+ activeFiltersCount > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
4816
+ /* @__PURE__ */ jsx(Separator5, { orientation: "vertical", className: "h-8" }),
4817
+ /* @__PURE__ */ jsxs(
4818
+ Button,
4819
+ {
4820
+ variant: "ghost",
4821
+ size: "sm",
4822
+ onClick: clearAllFilters,
4823
+ className: "text-gray-500 hover:text-gray-700",
4824
+ children: [
4825
+ /* @__PURE__ */ jsx(X, { className: "w-4 h-4 mr-1" }),
4826
+ "Limpar todos"
4827
+ ]
4828
+ }
4829
+ )
4830
+ ] })
4831
+ ] }),
4832
+ activeFiltersCount > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
4833
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-600", children: "Filtros ativos:" }),
4834
+ filters.vehicleId && /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
4835
+ "Placa: ",
4836
+ filters.vehicleId,
4837
+ /* @__PURE__ */ jsx(
4838
+ Button,
4839
+ {
4840
+ variant: "ghost",
4841
+ size: "sm",
4842
+ onClick: () => clearFilter("vehicleId"),
4843
+ className: "icon-size p-0 hover:bg-gray-200 ml-1",
4844
+ children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
4845
+ }
4846
+ )
4847
+ ] }),
4848
+ filters.operatorType && /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
4849
+ "Tipo: ",
4850
+ filters.operatorType === "ia" ? "IA" : "Humano",
4851
+ /* @__PURE__ */ jsx(
4852
+ Button,
4853
+ {
4854
+ variant: "ghost",
4855
+ size: "sm",
4856
+ onClick: () => clearFilter("operatorType"),
4857
+ className: "icon-size p-0 hover:bg-gray-200 ml-1",
4858
+ children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
4859
+ }
4860
+ )
4861
+ ] }),
4862
+ filters.status.length > 0 && filters.status.map((status) => {
4863
+ const statusLabel = statusOptions.find((s) => s.value === status)?.label || status;
4864
+ return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
4865
+ "Status: ",
4866
+ statusLabel,
4867
+ /* @__PURE__ */ jsx(
4868
+ Button,
4869
+ {
4870
+ variant: "ghost",
4871
+ size: "sm",
4872
+ onClick: () => toggleArrayFilter("status", status),
4873
+ className: "icon-size p-0 hover:bg-gray-200 ml-1",
4874
+ children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
4875
+ }
4876
+ )
4877
+ ] }, status);
4878
+ }),
4879
+ filters.businessUnits.map((unitCodigo) => {
4880
+ const unit = businessUnits.find((u) => u.codigo === unitCodigo);
4881
+ return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
4882
+ "Unidade: ",
4883
+ unit?.descricao,
4884
+ /* @__PURE__ */ jsx(
4885
+ Button,
4886
+ {
4887
+ variant: "ghost",
4888
+ size: "sm",
4889
+ onClick: () => toggleArrayFilter("businessUnits", unitCodigo),
4890
+ className: "icon-size p-0 hover:bg-gray-200 ml-1",
4891
+ children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
4892
+ }
4893
+ )
4894
+ ] }, unitCodigo);
4895
+ }),
4896
+ filters.operators.map((operator) => /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
4897
+ "Operador: ",
4898
+ operator,
4899
+ /* @__PURE__ */ jsx(
4900
+ Button,
4901
+ {
4902
+ variant: "ghost",
4903
+ size: "sm",
4904
+ onClick: () => toggleArrayFilter("operators", operator),
4905
+ className: "icon-size p-0 hover:bg-gray-200 ml-1",
4906
+ children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
4907
+ }
4908
+ )
4909
+ ] }, operator)),
4910
+ filters.taskTypes.map((taskType) => /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
4911
+ "Tipo: ",
4912
+ taskType,
4913
+ /* @__PURE__ */ jsx(
4914
+ Button,
4915
+ {
4916
+ variant: "ghost",
4917
+ size: "sm",
4918
+ onClick: () => toggleArrayFilter("taskTypes", taskType),
4919
+ className: "icon-size p-0 hover:bg-gray-200 ml-1",
4920
+ children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
4921
+ }
4922
+ )
4923
+ ] }, taskType))
4924
+ ] })
4925
+ ] });
4926
+ };
4927
+ var FilterBar_default = FilterBar;
4928
+ var FinishTreatmentModal = ({
4929
+ open,
4930
+ onOpenChange,
4931
+ onConfirm,
4932
+ activityId,
4933
+ activityTitle
4934
+ }) => {
4935
+ const [observacao, setObservacao] = useState("");
4936
+ const handleConfirm = () => {
4937
+ onConfirm(observacao);
4938
+ setObservacao("");
4939
+ onOpenChange(false);
4940
+ };
4941
+ const handleCancel = () => {
4942
+ setObservacao("");
4943
+ onOpenChange(false);
4944
+ };
4945
+ return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "sm:max-w-[500px]", children: [
4946
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [
4947
+ /* @__PURE__ */ jsx(DialogTitle, { children: "Finalizar Tratamento" }),
4948
+ /* @__PURE__ */ jsxs(DialogDescription, { children: [
4949
+ "Voc\xEA est\xE1 finalizando o tratamento ",
4950
+ /* @__PURE__ */ jsxs("strong", { children: [
4951
+ "#",
4952
+ activityId
4953
+ ] }),
4954
+ " - ",
4955
+ activityTitle,
4956
+ ". Por favor, informe uma observa\xE7\xE3o final (opcional)."
4957
+ ] })
4958
+ ] }),
4959
+ /* @__PURE__ */ jsx("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-2", children: [
4960
+ /* @__PURE__ */ jsx(Label3, { htmlFor: "observacao", children: "Observa\xE7\xE3o Final" }),
4961
+ /* @__PURE__ */ jsx(
4962
+ Textarea,
4963
+ {
4964
+ id: "observacao",
4965
+ placeholder: "Descreva o resultado do atendimento ou observa\xE7\xF5es relevantes...",
4966
+ value: observacao,
4967
+ onChange: (e) => setObservacao(e.target.value),
4968
+ rows: 4,
4969
+ className: "resize-none"
4970
+ }
4971
+ )
4972
+ ] }) }),
4973
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
4974
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: handleCancel, children: "Cancelar" }),
4975
+ /* @__PURE__ */ jsx(Button, { variant: "primary-acorde", onClick: handleConfirm, children: "Finalizar" })
4976
+ ] })
4977
+ ] }) });
4978
+ };
4979
+ var FinishTreatmentModal_default = FinishTreatmentModal;
4485
4980
  function GenericFilterBar({
4486
4981
  fields,
4487
4982
  filters,
@@ -5538,6 +6033,217 @@ function StandardPageLayout({
5538
6033
  ] })
5539
6034
  ] });
5540
6035
  }
6036
+ var StatusIndicator = ({ status, count: count2, label, onClick }) => {
6037
+ const getStatusColor = () => {
6038
+ switch (status) {
6039
+ case "online":
6040
+ return "bg-green-500";
6041
+ case "busy":
6042
+ return "bg-yellow-500";
6043
+ case "offline":
6044
+ return "bg-red-500";
6045
+ default:
6046
+ return "bg-gray-500";
6047
+ }
6048
+ };
6049
+ return /* @__PURE__ */ jsxs(
6050
+ "div",
6051
+ {
6052
+ onClick,
6053
+ className: `flex items-center gap-3 bg-white rounded-lg p-4 shadow-sm border border-gray-100 my-auto ${onClick ? "cursor-pointer" : ""}`,
6054
+ children: [
6055
+ /* @__PURE__ */ jsx("div", { className: `flex w-3 h-3 rounded-full ${getStatusColor()} animate-pulse m-auto` }),
6056
+ /* @__PURE__ */ jsx("div", { className: "flex items-center m-auto w-full", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-2 w-full justify-start", children: [
6057
+ /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold text-gray-800", children: count2 }),
6058
+ /* @__PURE__ */ jsx("p", { className: "flex my-auto text-sm text-gray-500", children: label })
6059
+ ] }) })
6060
+ ]
6061
+ }
6062
+ );
6063
+ };
6064
+ var StatusIndicator_default = StatusIndicator;
6065
+ var ViewToggle = ({ viewMode, onViewModeChange }) => {
6066
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border p-1", children: [
6067
+ /* @__PURE__ */ jsxs(
6068
+ Button,
6069
+ {
6070
+ variant: viewMode === "cards" ? "default" : "ghost",
6071
+ size: "sm",
6072
+ onClick: () => onViewModeChange("cards"),
6073
+ className: "flex items-center gap-2",
6074
+ children: [
6075
+ /* @__PURE__ */ jsx(LayoutGrid, { className: "icon-size" }),
6076
+ "Cards"
6077
+ ]
6078
+ }
6079
+ ),
6080
+ /* @__PURE__ */ jsxs(
6081
+ Button,
6082
+ {
6083
+ variant: viewMode === "dots" ? "default" : "ghost",
6084
+ size: "sm",
6085
+ onClick: () => onViewModeChange("dots"),
6086
+ className: "flex items-center gap-2",
6087
+ children: [
6088
+ /* @__PURE__ */ jsx(Circle, { className: "icon-size" }),
6089
+ "Resumido"
6090
+ ]
6091
+ }
6092
+ ),
6093
+ /* @__PURE__ */ jsxs(
6094
+ Button,
6095
+ {
6096
+ variant: viewMode === "chat" ? "default" : "ghost",
6097
+ size: "sm",
6098
+ onClick: () => onViewModeChange("chat"),
6099
+ className: "flex items-center gap-2",
6100
+ children: [
6101
+ /* @__PURE__ */ jsx(MessageSquare, { className: "icon-size" }),
6102
+ "Conversa"
6103
+ ]
6104
+ }
6105
+ )
6106
+ ] });
6107
+ };
6108
+ var ViewToggle_default = ViewToggle;
6109
+ function UserCombobox({
6110
+ users,
6111
+ value,
6112
+ onValueChange,
6113
+ placeholder = "Selecione um usu\xE1rio...",
6114
+ disabled = false,
6115
+ className
6116
+ }) {
6117
+ const [open, setOpen] = useState(false);
6118
+ const selectedUser = users.find((user) => user.id === value);
6119
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
6120
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
6121
+ Button,
6122
+ {
6123
+ variant: "outline",
6124
+ "aria-expanded": open,
6125
+ "aria-haspopup": "listbox",
6126
+ "aria-label": "Select user",
6127
+ className: cn("justify-between", className),
6128
+ disabled,
6129
+ children: [
6130
+ selectedUser ? /* @__PURE__ */ jsxs("span", { className: "truncate", children: [
6131
+ selectedUser.nome,
6132
+ " (",
6133
+ selectedUser.login,
6134
+ ")"
6135
+ ] }) : /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: placeholder }),
6136
+ /* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-2 icon-size shrink-0 opacity-50" })
6137
+ ]
6138
+ }
6139
+ ) }),
6140
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-[400px] p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { children: [
6141
+ /* @__PURE__ */ jsx(CommandInput, { placeholder: "Digite para buscar usu\xE1rio..." }),
6142
+ /* @__PURE__ */ jsxs(CommandList, { children: [
6143
+ /* @__PURE__ */ jsx(CommandEmpty, { children: "Nenhum usu\xE1rio encontrado." }),
6144
+ /* @__PURE__ */ jsx(CommandGroup, { children: users.map((user) => /* @__PURE__ */ jsxs(
6145
+ CommandItem,
6146
+ {
6147
+ value: `${user.nome} ${user.login} ${user.email}`,
6148
+ onSelect: () => {
6149
+ onValueChange(user.id === value ? null : user.id);
6150
+ setOpen(false);
6151
+ },
6152
+ children: [
6153
+ /* @__PURE__ */ jsx(
6154
+ Check,
6155
+ {
6156
+ className: cn(
6157
+ "mr-2 icon-size",
6158
+ value === user.id ? "opacity-100" : "opacity-0"
6159
+ )
6160
+ }
6161
+ ),
6162
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
6163
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: user.nome }),
6164
+ /* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
6165
+ user.login,
6166
+ " \u2022 ",
6167
+ user.email
6168
+ ] })
6169
+ ] })
6170
+ ]
6171
+ },
6172
+ user.id
6173
+ )) })
6174
+ ] })
6175
+ ] }) })
6176
+ ] });
6177
+ }
6178
+ function UnidadeNegocioCombobox({
6179
+ unidades,
6180
+ value,
6181
+ onValueChange,
6182
+ placeholder = "Selecione uma unidade...",
6183
+ disabled = false,
6184
+ className
6185
+ }) {
6186
+ const [open, setOpen] = useState(false);
6187
+ const selectedUnidade = unidades.find((unidade) => unidade.codigo === value);
6188
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
6189
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
6190
+ Button,
6191
+ {
6192
+ variant: "outline",
6193
+ "aria-expanded": open,
6194
+ "aria-haspopup": "listbox",
6195
+ "aria-label": "Select business unit",
6196
+ className: cn("justify-between", className),
6197
+ disabled,
6198
+ children: [
6199
+ selectedUnidade ? /* @__PURE__ */ jsxs("span", { className: "truncate", children: [
6200
+ selectedUnidade.descricao,
6201
+ " (",
6202
+ selectedUnidade.codigo,
6203
+ ")"
6204
+ ] }) : /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: placeholder }),
6205
+ /* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-2 icon-size shrink-0 opacity-50" })
6206
+ ]
6207
+ }
6208
+ ) }),
6209
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-[400px] p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { children: [
6210
+ /* @__PURE__ */ jsx(CommandInput, { placeholder: "Digite para buscar unidade..." }),
6211
+ /* @__PURE__ */ jsxs(CommandList, { children: [
6212
+ /* @__PURE__ */ jsx(CommandEmpty, { children: "Nenhuma unidade encontrada." }),
6213
+ /* @__PURE__ */ jsx(CommandGroup, { children: unidades.map((unidade) => /* @__PURE__ */ jsxs(
6214
+ CommandItem,
6215
+ {
6216
+ value: `${unidade.descricao} ${unidade.codigo} ${unidade.cnpj}`,
6217
+ onSelect: () => {
6218
+ onValueChange(unidade.codigo === value ? null : unidade.codigo);
6219
+ setOpen(false);
6220
+ },
6221
+ children: [
6222
+ /* @__PURE__ */ jsx(
6223
+ Check,
6224
+ {
6225
+ className: cn(
6226
+ "mr-2 icon-size",
6227
+ value === unidade.codigo ? "opacity-100" : "opacity-0"
6228
+ )
6229
+ }
6230
+ ),
6231
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
6232
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: unidade.descricao }),
6233
+ /* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
6234
+ unidade.codigo,
6235
+ " \u2022 CNPJ: ",
6236
+ unidade.cnpj
6237
+ ] })
6238
+ ] })
6239
+ ]
6240
+ },
6241
+ unidade.codigo
6242
+ )) })
6243
+ ] })
6244
+ ] }) })
6245
+ ] });
6246
+ }
5541
6247
  var SSOError = memo(({
5542
6248
  errorType,
5543
6249
  message,
@@ -5762,6 +6468,7 @@ Detalhes: ${details}`
5762
6468
  ] })
5763
6469
  ] }) });
5764
6470
  });
6471
+ var SSOError_default = SSOError;
5765
6472
  SSOError.displayName = "SSOError";
5766
6473
  var SSOLoadingOverlay = memo(({
5767
6474
  step,
@@ -5926,6 +6633,7 @@ var SSOLoadingOverlay = memo(({
5926
6633
  ] })
5927
6634
  ] }) }) });
5928
6635
  });
6636
+ var SSOLoadingOverlay_default = SSOLoadingOverlay;
5929
6637
  SSOLoadingOverlay.displayName = "SSOLoadingOverlay";
5930
6638
  var SSOLoginButton = memo(({
5931
6639
  tenantId,
@@ -6046,6 +6754,7 @@ var SSOLoginButton = memo(({
6046
6754
  ] });
6047
6755
  });
6048
6756
  SSOLoginButton.displayName = "SSOLoginButton";
6757
+ var SSOLoginButton_default = SSOLoginButton;
6049
6758
  var ExecutionProgress = ({ execution }) => {
6050
6759
  const progress = execution.totalNodes > 0 ? execution.executedNodes / execution.totalNodes * 100 : 0;
6051
6760
  const getStatusIcon = () => {
@@ -8837,7 +9546,7 @@ function ExpandableText({
8837
9546
  ] });
8838
9547
  }
8839
9548
  var ProcessingIndicator = () => /* @__PURE__ */ jsx("div", { className: "absolute -top-2 -right-2 bg-white rounded-full p-1 shadow-lg border-2 border-acorde-primary", children: /* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 text-acorde-primary animate-spin" }) });
8840
- var StatusIndicator = ({ status }) => {
9549
+ var StatusIndicator2 = ({ status }) => {
8841
9550
  if (!status) return null;
8842
9551
  const Icon2 = status === "success" ? CheckCircle2 : XCircle;
8843
9552
  const bgColor = status === "success" ? "bg-green-500" : "bg-red-500";
@@ -8884,7 +9593,7 @@ function AIAgentNode({ data, selected }) {
8884
9593
  }
8885
9594
  ),
8886
9595
  isProcessing && /* @__PURE__ */ jsx(ProcessingIndicator, {}),
8887
- !isProcessing && data.lastExecutionStatus && /* @__PURE__ */ jsx(StatusIndicator, { status: data.lastExecutionStatus }),
9596
+ !isProcessing && data.lastExecutionStatus && /* @__PURE__ */ jsx(StatusIndicator2, { status: data.lastExecutionStatus }),
8888
9597
  /* @__PURE__ */ jsxs("div", { className: "node-header flex items-center justify-between mb-3", children: [
8889
9598
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8890
9599
  /* @__PURE__ */ jsx("div", { className: "node-icon w-8 h-8 bg-purple-100 rounded-lg flex items-center justify-center border border-purple-200", children: /* @__PURE__ */ jsx(Brain, { className: "w-5 h-5 text-purple-600" }) }),
@@ -19367,38 +20076,11 @@ function MotoristaTable({
19367
20076
  onDelete,
19368
20077
  onBlock
19369
20078
  }) {
19370
- const { deleteMutation, toggleBlockMutation } = useMotoristaMutations();
19371
- const handleDelete = async (cd_motorista) => {
19372
- try {
19373
- await deleteMutation.mutateAsync(cd_motorista);
19374
- toast({
19375
- title: "Sucesso",
19376
- description: "Motorista exclu\xEDdo com sucesso"
19377
- });
19378
- onDelete(cd_motorista);
19379
- } catch {
19380
- toast({
19381
- title: "Erro",
19382
- description: "Erro ao excluir motorista",
19383
- variant: "destructive"
19384
- });
19385
- }
20079
+ const handleDelete = (cd_motorista) => {
20080
+ onDelete(cd_motorista);
19386
20081
  };
19387
- const handleToggleBlock = async (cd_motorista, bloqueado) => {
19388
- try {
19389
- await toggleBlockMutation.mutateAsync({ cd_motorista, bloqueado });
19390
- toast({
19391
- title: "Sucesso",
19392
- description: bloqueado ? "Motorista bloqueado" : "Motorista desbloqueado"
19393
- });
19394
- onBlock(cd_motorista, bloqueado);
19395
- } catch {
19396
- toast({
19397
- title: "Erro",
19398
- description: "Erro ao alterar status do motorista",
19399
- variant: "destructive"
19400
- });
19401
- }
20082
+ const handleToggleBlock = (cd_motorista, bloqueado) => {
20083
+ onBlock(cd_motorista, bloqueado);
19402
20084
  };
19403
20085
  if (isLoading) {
19404
20086
  return /* @__PURE__ */ jsxs("div", { className: "animate-pulse", children: [
@@ -23706,7 +24388,389 @@ var WebhookMetricsMapper = class {
23706
24388
  };
23707
24389
  }
23708
24390
  };
24391
+ function filterMenuItems(items, user) {
24392
+ return items.filter((item) => canAccessMenu(user, item.permission)).map((item) => {
24393
+ if (item.subItems) {
24394
+ const filteredSubItems = filterMenuItems(
24395
+ item.subItems,
24396
+ user
24397
+ );
24398
+ if (filteredSubItems.length === 0) {
24399
+ return null;
24400
+ }
24401
+ return {
24402
+ ...item,
24403
+ subItems: filteredSubItems
24404
+ };
24405
+ }
24406
+ return item;
24407
+ }).filter((item) => item !== null);
24408
+ }
24409
+ function RenderSubmenu({
24410
+ items,
24411
+ level,
24412
+ isMenuExpanded,
24413
+ isMenuItemActive,
24414
+ toggleSubmenu
24415
+ }) {
24416
+ const { state } = useSidebar();
24417
+ const isCollapsed = state === "collapsed";
24418
+ if (!items) return null;
24419
+ return /* @__PURE__ */ jsx(CustomSidebarMenuSub, { level, children: items.map((subItem) => {
24420
+ const hasSubItems = subItem.subItems && subItem.subItems.length > 0;
24421
+ const paddingLeft = isCollapsed ? 8 : Math.min(level * 8 + 4, 28);
24422
+ return /* @__PURE__ */ jsx(CustomSidebarMenuSubItem, { children: hasSubItems ? /* @__PURE__ */ jsxs(Fragment, { children: [
24423
+ /* @__PURE__ */ jsxs(Tooltip2, { children: [
24424
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
24425
+ CustomSidebarMenuSubButton,
24426
+ {
24427
+ onClick: () => toggleSubmenu(subItem.title),
24428
+ className: "w-full justify-start pr-2",
24429
+ style: { paddingLeft: `${paddingLeft}px` },
24430
+ children: [
24431
+ subItem.icon && /* @__PURE__ */ jsx(subItem.icon, { className: "w-4 h-4 shrink-0 mr-2" }),
24432
+ !isCollapsed && /* @__PURE__ */ jsxs(Fragment, { children: [
24433
+ /* @__PURE__ */ jsx("span", { className: "truncate flex-1", children: subItem.title }),
24434
+ /* @__PURE__ */ jsx(
24435
+ ChevronRight,
24436
+ {
24437
+ className: `w-4 h-4 shrink-0 transition-transform ${isMenuExpanded(subItem.title) ? "rotate-90" : ""}`
24438
+ }
24439
+ )
24440
+ ] })
24441
+ ]
24442
+ }
24443
+ ) }),
24444
+ isCollapsed && /* @__PURE__ */ jsx(TooltipContent, { side: "right", className: "font-medium", children: subItem.title })
24445
+ ] }),
24446
+ isMenuExpanded(subItem.title) && /* @__PURE__ */ jsx(
24447
+ RenderSubmenu,
24448
+ {
24449
+ items: subItem.subItems,
24450
+ level: level + 1,
24451
+ isMenuExpanded,
24452
+ isMenuItemActive,
24453
+ toggleSubmenu
24454
+ }
24455
+ )
24456
+ ] }) : /* @__PURE__ */ jsxs(Tooltip2, { children: [
24457
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(CustomSidebarMenuSubButton, { asChild: true, children: /* @__PURE__ */ jsxs(
24458
+ Link,
24459
+ {
24460
+ to: subItem.url || "#",
24461
+ className: `justify-start pr-2 ${isMenuItemActive(subItem.url || "") ? "bg-accent text-accent-foreground" : ""}`,
24462
+ style: { paddingLeft: `${paddingLeft}px` },
24463
+ children: [
24464
+ subItem.icon && /* @__PURE__ */ jsx(subItem.icon, { className: "w-4 h-4 shrink-0 mr-2" }),
24465
+ !isCollapsed && /* @__PURE__ */ jsx("span", { className: "truncate flex-1", children: subItem.title })
24466
+ ]
24467
+ }
24468
+ ) }) }),
24469
+ isCollapsed && /* @__PURE__ */ jsx(TooltipContent, { side: "right", className: "font-medium", children: subItem.title })
24470
+ ] }) }, subItem.title);
24471
+ }) });
24472
+ }
24473
+ function ControlTowerSidebar({
24474
+ currentTime,
24475
+ routePaths
24476
+ }) {
24477
+ const { user, logout, getCurrentTenantId } = useAuthContext();
24478
+ const {
24479
+ toggleSubmenu,
24480
+ isMenuExpanded,
24481
+ isMenuItemActive,
24482
+ isExactMenuItemActive
24483
+ } = useSidebarState(routePaths);
24484
+ const { state } = useSidebar();
24485
+ const isCollapsed = state === "collapsed";
24486
+ const [internalTime, setInternalTime] = React36__default.useState(/* @__PURE__ */ new Date());
24487
+ const currentTenantId = getCurrentTenantId();
24488
+ console.log(currentTenantId);
24489
+ const isMasterTenant = currentTenantId === "master";
24490
+ const menuItems = [
24491
+ {
24492
+ title: "Dashboard",
24493
+ url: routePaths.DASHBOARD,
24494
+ icon: Monitor,
24495
+ permission: MenuPermissionLevel.ALL
24496
+ },
24497
+ {
24498
+ title: "Monitoramento de Rotas",
24499
+ url: routePaths.ROUTE_MONITORING,
24500
+ icon: Navigation,
24501
+ permission: MenuPermissionLevel.MASTER_TENANT_ONLY
24502
+ },
24503
+ {
24504
+ title: "Monitoramento de Rotas",
24505
+ url: routePaths.ROUTE_MONITORING,
24506
+ icon: Navigation,
24507
+ permission: MenuPermissionLevel.ADMIN_ONLY
24508
+ },
24509
+ {
24510
+ title: "Alertas",
24511
+ url: routePaths.ALERTS,
24512
+ icon: Bell,
24513
+ permission: MenuPermissionLevel.ALL
24514
+ },
24515
+ {
24516
+ title: "Relat\xF3rios",
24517
+ url: routePaths.REPORTS,
24518
+ icon: BarChart3,
24519
+ permission: MenuPermissionLevel.ALL
24520
+ },
24521
+ {
24522
+ title: "Configura\xE7\xF5es",
24523
+ icon: Settings,
24524
+ permission: MenuPermissionLevel.ADMIN_ONLY,
24525
+ subItems: [
24526
+ {
24527
+ title: "Configura\xE7\xF5es Gerais",
24528
+ url: routePaths.SETTINGS,
24529
+ icon: Settings,
24530
+ permission: MenuPermissionLevel.ALL
24531
+ },
24532
+ {
24533
+ title: "Usu\xE1rios",
24534
+ icon: Users,
24535
+ permission: MenuPermissionLevel.MANAGER_OR_ADMIN,
24536
+ subItems: [
24537
+ {
24538
+ title: "Gest\xE3o de Usu\xE1rios",
24539
+ url: routePaths.USER_MANAGEMENT,
24540
+ icon: UserCheck,
24541
+ permission: MenuPermissionLevel.MANAGER_OR_ADMIN
24542
+ },
24543
+ {
24544
+ title: "Perfis de Usu\xE1rio",
24545
+ url: routePaths.USER_PROFILES,
24546
+ icon: UserCog,
24547
+ permission: MenuPermissionLevel.MANAGER_OR_ADMIN
24548
+ },
24549
+ {
24550
+ title: "Permiss\xF5es",
24551
+ url: routePaths.PERMISSIONS_MANAGEMENT,
24552
+ icon: Shield,
24553
+ permission: MenuPermissionLevel.ADMIN_ONLY
24554
+ }
24555
+ ]
24556
+ },
24557
+ {
24558
+ title: "Motoristas",
24559
+ url: routePaths.MOTORISTAS,
24560
+ icon: Car,
24561
+ permission: MenuPermissionLevel.MANAGER_OR_ADMIN
24562
+ },
24563
+ {
24564
+ title: "WhatsApp",
24565
+ icon: MessageCircle,
24566
+ permission: MenuPermissionLevel.MANAGER_OR_ADMIN,
24567
+ subItems: [
24568
+ {
24569
+ title: "Configura\xE7\xF5es",
24570
+ url: routePaths.WHATSAPP_CONFIG,
24571
+ icon: Settings,
24572
+ permission: MenuPermissionLevel.MANAGER_OR_ADMIN
24573
+ },
24574
+ {
24575
+ title: "Triggers de Fluxo",
24576
+ url: routePaths.WHATSAPP_TRIGGERS,
24577
+ icon: Workflow,
24578
+ permission: MenuPermissionLevel.MANAGER_OR_ADMIN
24579
+ },
24580
+ {
24581
+ title: "Monitoramento",
24582
+ url: routePaths.WHATSAPP_MONITORING,
24583
+ icon: Monitor,
24584
+ permission: MenuPermissionLevel.MANAGER_OR_ADMIN
24585
+ }
24586
+ ]
24587
+ },
24588
+ ...isMasterTenant ? [] : [{
24589
+ title: "Unidades de Neg\xF3cio",
24590
+ url: routePaths.UNIDADES_NEGOCIO,
24591
+ icon: Building2,
24592
+ permission: MenuPermissionLevel.MANAGER_OR_ADMIN
24593
+ }],
24594
+ ...isMasterTenant ? [
24595
+ {
24596
+ title: "Tenants",
24597
+ url: routePaths.TENANT_MANAGEMENT,
24598
+ icon: Database,
24599
+ permission: MenuPermissionLevel.ADMIN_ONLY
24600
+ }
24601
+ ] : []
24602
+ ]
24603
+ },
24604
+ {
24605
+ title: "Automa\xE7\xE3o",
24606
+ icon: Bot,
24607
+ permission: MenuPermissionLevel.MANAGER_OR_ADMIN,
24608
+ subItems: [
24609
+ {
24610
+ title: "Fluxos de Automa\xE7\xE3o",
24611
+ url: routePaths.FLOWS,
24612
+ icon: Workflow,
24613
+ permission: MenuPermissionLevel.MANAGER_OR_ADMIN
24614
+ },
24615
+ {
24616
+ title: "Credenciais",
24617
+ url: routePaths.CREDENTIALS,
24618
+ icon: Key,
24619
+ permission: MenuPermissionLevel.MANAGER_OR_ADMIN
24620
+ }
24621
+ ]
24622
+ }
24623
+ ];
24624
+ React36__default.useEffect(() => {
24625
+ if (!currentTime) {
24626
+ const timer = setInterval(() => {
24627
+ setInternalTime(/* @__PURE__ */ new Date());
24628
+ }, 1e3);
24629
+ return () => clearInterval(timer);
24630
+ }
24631
+ }, [currentTime]);
24632
+ const displayTime = currentTime || internalTime;
24633
+ const filteredMenuItems = filterMenuItems(menuItems, user);
24634
+ return /* @__PURE__ */ jsxs(Sidebar, { className: "border-r border-gray-200", collapsible: "icon", children: [
24635
+ /* @__PURE__ */ jsxs(SidebarHeader, { className: "border-b border-gray-200", children: [
24636
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between px-2 py-2", children: /* @__PURE__ */ jsx(SidebarTrigger, { className: "ml-auto" }) }),
24637
+ !isCollapsed && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1 px-2 py-1", children: [
24638
+ /* @__PURE__ */ jsx(
24639
+ "img",
24640
+ {
24641
+ src: "/lovable-uploads/632ebc32-3ae3-4944-8e70-0e9c2539494a.png",
24642
+ alt: "Lincros Logo",
24643
+ className: "w-20 h-20 object-contain"
24644
+ }
24645
+ ),
24646
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
24647
+ /* @__PURE__ */ jsx("h2", { className: "font-bold text-lg text-gray-800", children: "Lincros" }),
24648
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500", children: "Torre de Controle 4.0" })
24649
+ ] })
24650
+ ] }),
24651
+ isCollapsed && /* @__PURE__ */ jsx("div", { className: "flex justify-center px-2 py-2", children: /* @__PURE__ */ jsx(
24652
+ "img",
24653
+ {
24654
+ src: "/lovable-uploads/632ebc32-3ae3-4944-8e70-0e9c2539494a.png",
24655
+ alt: "Lincros Logo",
24656
+ className: "w-8 h-8 object-contain"
24657
+ }
24658
+ ) })
24659
+ ] }),
24660
+ /* @__PURE__ */ jsx(SidebarContent, { children: /* @__PURE__ */ jsxs(SidebarGroup, { children: [
24661
+ !isCollapsed && /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "Menu Principal" }),
24662
+ /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: filteredMenuItems.map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: item.subItems ? /* @__PURE__ */ jsxs(Fragment, { children: [
24663
+ /* @__PURE__ */ jsxs(Tooltip2, { children: [
24664
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
24665
+ SidebarMenuButton,
24666
+ {
24667
+ onClick: () => toggleSubmenu(item.title),
24668
+ className: "w-full justify-start pr-2",
24669
+ children: [
24670
+ /* @__PURE__ */ jsx(item.icon, { className: "w-4 h-4 shrink-0" }),
24671
+ !isCollapsed && /* @__PURE__ */ jsxs(Fragment, { children: [
24672
+ /* @__PURE__ */ jsx("span", { className: "truncate flex-1", children: item.title }),
24673
+ /* @__PURE__ */ jsx(
24674
+ ChevronRight,
24675
+ {
24676
+ className: `w-4 h-4 shrink-0 transition-transform ${isMenuExpanded(item.title) ? "rotate-90" : ""}`
24677
+ }
24678
+ )
24679
+ ] })
24680
+ ]
24681
+ }
24682
+ ) }),
24683
+ isCollapsed && /* @__PURE__ */ jsx(TooltipContent, { side: "right", className: "font-medium", children: item.title })
24684
+ ] }),
24685
+ isMenuExpanded(item.title) && /* @__PURE__ */ jsx(
24686
+ RenderSubmenu,
24687
+ {
24688
+ items: item.subItems,
24689
+ level: 1,
24690
+ isMenuExpanded,
24691
+ isMenuItemActive,
24692
+ toggleSubmenu
24693
+ }
24694
+ )
24695
+ ] }) : /* @__PURE__ */ jsxs(Tooltip2, { children: [
24696
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(SidebarMenuButton, { asChild: true, children: /* @__PURE__ */ jsxs(
24697
+ Link,
24698
+ {
24699
+ to: item.url || "#",
24700
+ className: `justify-start pr-2 ${isExactMenuItemActive(item.url || "") ? "bg-accent text-accent-foreground" : ""}`,
24701
+ children: [
24702
+ /* @__PURE__ */ jsx(item.icon, { className: "w-4 h-4 shrink-0" }),
24703
+ !isCollapsed && /* @__PURE__ */ jsx("span", { className: "truncate flex-1", children: item.title })
24704
+ ]
24705
+ }
24706
+ ) }) }),
24707
+ isCollapsed && /* @__PURE__ */ jsx(TooltipContent, { side: "right", className: "font-medium", children: item.title })
24708
+ ] }) }, item.title)) }) })
24709
+ ] }) }),
24710
+ /* @__PURE__ */ jsx(SidebarFooter, { className: "border-t border-gray-200", children: /* @__PURE__ */ jsxs("div", { className: `p-2 space-y-2 ${isCollapsed ? "px-1" : ""}`, children: [
24711
+ user && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between", children: !isCollapsed ? /* @__PURE__ */ jsxs(Fragment, { children: [
24712
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0 flex-1", children: [
24713
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-gray-700 truncate", children: user.login }),
24714
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-gray-500 truncate", children: user.email })
24715
+ ] }),
24716
+ /* @__PURE__ */ jsx(
24717
+ Button,
24718
+ {
24719
+ variant: "ghost",
24720
+ size: "sm",
24721
+ onClick: () => logout(),
24722
+ className: "h-8 w-8 p-0 shrink-0 ml-2",
24723
+ title: "Logout",
24724
+ children: /* @__PURE__ */ jsx(LogOut, { className: "icon-size" })
24725
+ }
24726
+ )
24727
+ ] }) : /* @__PURE__ */ jsxs(Tooltip2, { children: [
24728
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
24729
+ Button,
24730
+ {
24731
+ variant: "ghost",
24732
+ size: "sm",
24733
+ onClick: () => logout(),
24734
+ className: "h-8 w-8 p-0",
24735
+ children: /* @__PURE__ */ jsx(LogOut, { className: "icon-size" })
24736
+ }
24737
+ ) }),
24738
+ /* @__PURE__ */ jsxs(TooltipContent, { side: "right", className: "font-medium", children: [
24739
+ "Logout (",
24740
+ user.login,
24741
+ ")"
24742
+ ] })
24743
+ ] }) }),
24744
+ !isCollapsed && /* @__PURE__ */ jsxs(Fragment, { children: [
24745
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
24746
+ /* @__PURE__ */ jsx("div", { className: "w-2 h-2 bg-green-500 rounded-full animate-pulse" }),
24747
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-gray-600 font-medium", children: "Sistema Online" })
24748
+ ] }),
24749
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
24750
+ /* @__PURE__ */ jsx(Clock, { className: "w-3 h-3 text-gray-400" }),
24751
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500", children: displayTime.toLocaleString("pt-BR") })
24752
+ ] })
24753
+ ] }),
24754
+ isCollapsed && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
24755
+ /* @__PURE__ */ jsxs(Tooltip2, { children: [
24756
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "w-2 h-2 bg-green-500 rounded-full animate-pulse" }) }),
24757
+ /* @__PURE__ */ jsx(TooltipContent, { side: "right", className: "font-medium", children: "Sistema Online" })
24758
+ ] }),
24759
+ /* @__PURE__ */ jsxs(Tooltip2, { children: [
24760
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Clock, { className: "w-4 h-4 text-gray-400" }) }),
24761
+ /* @__PURE__ */ jsx(TooltipContent, { side: "right", className: "font-medium", children: displayTime.toLocaleString("pt-BR") })
24762
+ ] })
24763
+ ] })
24764
+ ] }) })
24765
+ ] });
24766
+ }
24767
+ function MainLayout({ children }) {
24768
+ return /* @__PURE__ */ jsx(SidebarProvider, { children: /* @__PURE__ */ jsxs("div", { className: "h-screen w-full flex", children: [
24769
+ /* @__PURE__ */ jsx(ControlTowerSidebar, {}),
24770
+ /* @__PURE__ */ jsx("main", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "h-full overflow-y-auto", children }) })
24771
+ ] }) });
24772
+ }
23709
24773
 
23710
- export { AIAgentConfigModal, AIAgentNode, Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionNode, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeGroup, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BreakpointIndicator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithIcon, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatContainer, ChatHeader, ChatInput, ChatLayout, ChatMessages, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CompositeNode, CompositeNodeConfigModal, ConditionNode, ConditionalBreakpointModal, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CountBadge, CustomEdge, CustomEdgeWithTooltip, CustomSidebarMenuSub, CustomSidebarMenuSubButton, CustomSidebarMenuSubItem, DEFAULT_WEBHOOK_CONFIG, DebugControlPanel, DebugModeToggle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogMaximizableContent, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EdgeLabel, EventInspector, ExecutableNode, ExecuteFlowModal, ExecutionDataNode, ExecutionDataNodeForm, ExecutionHistorySidebar, ExecutionProgress, ExpandableText, FlowEditor, FlowExecutionPanel, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, GenericFilterBar, HoverCard, HoverCardContent, HoverCardTrigger, ImportErrorDisplay, ImportFlowFileModal, ImportFlowsModal, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputWithLabel, JSONSchemaEditor, Label3 as Label, LoopConfigModal, LoopExecutionMonitor, LoopNode, LoopResultsViewer, MCPCategoryToNodeType, MCPSubtypeToIcon, MCPToolNode, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MergeNode, MessageBubble, MessageHistory, MessageInput, MotoristaFilters, MotoristaForm, MotoristaStatusBadge, MotoristaTable, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NodeLibraryPanel, NodeOutputViewer, NodePropertiesModal, NotificationBadge, PageHeader, Pagination, PaginationContent, PaginationControls, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, ParameterInput, Popover, PopoverContent, PopoverTrigger, Progress, PromptEditor, PromptTestModal, QRCodeModal, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTextEditor, RichTextRenderer, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SendMessageModal, Separator5 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, SplitConfigModal, SplitNode, StandardPageLayout, StatusBadge, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip2 as Tooltip, TooltipButton, TooltipContent, TooltipProvider, TooltipTrigger, TriggerNode, TypingIndicator, VariablePicker, WEBHOOK_TEST_EVENTS, WebhookConfigModal, WebhookEventCard, WebhookEventMapper, WebhookFlowLink, WebhookLogsViewer, WebhookMetricsChart, WebhookMetricsMapper, WebhookSubscriptionMapper, WebhookTestModal, WebhookTimeline, WhatsAppHealthMonitor, WhatsAppTriggerConfigModal, WhatsAppTriggerMetricsModal, WhatsAppTriggerNode, WhatsAppTriggerTestModal, badgeVariants, beautifyString, buttonVariants, calculateProcessingTime, capitalizeFirst, cn, formatDate, formatDateTime, formatEventType, formatLocalDate, formatLocalDateTime, formatLocalTime, formatStatus, formatTime, getEventTypeVariant, getMetricColor, getNodeBorderStyles, getNodeIconColor, getNodeIconTextColor, getStatusVariant, getTimelineColor, isValidWebhookPayload, navigationMenuTriggerStyle, sanitizeWebhookUrl, toCamelCase, toSnakeCase, toast, toggleVariants, useFormField, useIsMobile, useSidebar, useToast, validateUrl };
24774
+ export { AIAgentConfigModal, AIAgentNode, Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionNode, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BadgeGroup, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BreakpointIndicator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithIcon, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChatContainer, ChatHeader, ChatInput, ChatLayout, ChatMessages, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CompositeNode, CompositeNodeConfigModal, ConditionNode, ConditionalBreakpointModal, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CountBadge, CustomEdge, CustomEdgeWithTooltip, CustomSidebarMenuSub, CustomSidebarMenuSubButton, CustomSidebarMenuSubItem, DEFAULT_WEBHOOK_CONFIG, DebugControlPanel, DebugModeToggle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogMaximizableContent, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EdgeLabel, EventInspector, ExecutableNode, ExecuteFlowModal, ExecutionDataNode, ExecutionDataNodeForm, ExecutionHistorySidebar, ExecutionProgress, ExpandableText, FilterBar_default as FilterBar, FinishTreatmentModal_default as FinishTreatmentModal, FlowEditor, FlowExecutionPanel, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, ImportErrorDisplay, ImportFlowFileModal, ImportFlowsModal, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputWithLabel, JSONSchemaEditor, Label3 as Label, LoopConfigModal, LoopExecutionMonitor, LoopNode, LoopResultsViewer, MCPCategoryToNodeType, MCPSubtypeToIcon, MCPToolNode, MainLayout, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MergeNode, MessageBubble, MessageHistory, MessageInput, MotoristaFilters, MotoristaForm, MotoristaStatusBadge, MotoristaTable, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NodeLibraryPanel, NodeOutputViewer, NodePropertiesModal, NotificationBadge, PageHeader, Pagination, PaginationContent, PaginationControls, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, ParameterInput, Popover, PopoverContent, PopoverTrigger, Progress, PromptEditor, PromptTestModal, QRCodeModal, RadioGroup4 as RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTextEditor, RichTextRenderer, SSOError_default as SSOError, SSOLoadingOverlay_default as SSOLoadingOverlay, SSOLoginButton_default as SSOLoginButton, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SendMessageModal, Separator5 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, SplitConfigModal, SplitNode, StandardPageLayout, StatusBadge, StatusIndicator_default as StatusIndicator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip2 as Tooltip, TooltipButton, TooltipContent, TooltipProvider, TooltipTrigger, TriggerNode, TypingIndicator, UnidadeNegocioCombobox, UserCombobox, VariablePicker, ViewToggle_default as ViewToggle, WEBHOOK_TEST_EVENTS, WebhookConfigModal, WebhookEventCard, WebhookEventMapper, WebhookFlowLink, WebhookLogsViewer, WebhookMetricsChart, WebhookMetricsMapper, WebhookSubscriptionMapper, WebhookTestModal, WebhookTimeline, WhatsAppHealthMonitor, WhatsAppTriggerConfigModal, WhatsAppTriggerMetricsModal, WhatsAppTriggerNode, WhatsAppTriggerTestModal, badgeVariants, beautifyString, buttonVariants, calculateProcessingTime, capitalizeFirst, cn, formatDate, formatDateTime, formatEventType, formatLocalDate, formatLocalDateTime, formatLocalTime, formatStatus, formatTime, getEventTypeVariant, getMetricColor, getNodeBorderStyles, getNodeIconColor, getNodeIconTextColor, getStatusVariant, getTimelineColor, isValidWebhookPayload, navigationMenuTriggerStyle, sanitizeWebhookUrl, toCamelCase, toSnakeCase, toast, toggleVariants, useFormField, useIsMobile, useSidebar, useToast, validateUrl };
23711
24775
  //# sourceMappingURL=index.js.map
23712
24776
  //# sourceMappingURL=index.js.map