@lincros-ui/components 0.2.25 → 0.2.28

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
@@ -5432,13 +5432,16 @@ var FilterBar = ({
5432
5432
  taskTypes,
5433
5433
  businessUnits,
5434
5434
  statusOptions: statusOptionsProp,
5435
- defaultStatus: defaultStatusProp
5435
+ defaultStatus: defaultStatusProp,
5436
+ variant = "default",
5437
+ className
5436
5438
  }) => {
5437
5439
  const [openPopovers, setOpenPopovers] = useState({
5438
5440
  businessUnits: false,
5439
5441
  operators: false,
5440
5442
  taskTypes: false,
5441
- status: false
5443
+ status: false,
5444
+ all: false
5442
5445
  });
5443
5446
  const statusOptions = statusOptionsProp ?? [
5444
5447
  { value: "in-progress", label: "Em Andamento (IA)" },
@@ -5448,8 +5451,7 @@ var FilterBar = ({
5448
5451
  ];
5449
5452
  const defaultStatus = defaultStatusProp ?? ["in-progress", "human-interaction"];
5450
5453
  const updateFilter = (key, value) => {
5451
- const newFilters = { ...filters, [key]: value };
5452
- onFilterChange(newFilters);
5454
+ onFilterChange({ ...filters, [key]: value });
5453
5455
  };
5454
5456
  const clearFilter = (key) => {
5455
5457
  if (key === "vehicleId" || key === "operatorType") {
@@ -5461,7 +5463,7 @@ var FilterBar = ({
5461
5463
  }
5462
5464
  };
5463
5465
  const clearAllFilters = () => {
5464
- const emptyFilters = {
5466
+ onFilterChange({
5465
5467
  vehicleId: "",
5466
5468
  operators: [],
5467
5469
  taskTypes: [],
@@ -5470,407 +5472,323 @@ var FilterBar = ({
5470
5472
  status: defaultStatus,
5471
5473
  startDate: "",
5472
5474
  endDate: ""
5473
- };
5474
- onFilterChange(emptyFilters);
5475
- setOpenPopovers({ businessUnits: false, operators: false, taskTypes: false, status: false });
5475
+ });
5476
+ setOpenPopovers({ businessUnits: false, operators: false, taskTypes: false, status: false, all: false });
5476
5477
  };
5477
5478
  const toggleArrayFilter = (key, value) => {
5478
- const currentArray = filters[key];
5479
- const newArray = currentArray.includes(value) ? currentArray.filter((item) => item !== value) : [...currentArray, value];
5480
- updateFilter(key, newArray);
5479
+ const current = filters[key];
5480
+ const next = current.includes(value) ? current.filter((i) => i !== value) : [...current, value];
5481
+ updateFilter(key, next);
5481
5482
  };
5483
+ const isNonDefaultStatus = JSON.stringify([...filters.status].sort()) !== JSON.stringify([...defaultStatus].sort());
5482
5484
  const activeFiltersCount = [
5483
- filters.vehicleId,
5484
5485
  filters.operatorType,
5485
5486
  filters.startDate,
5486
5487
  filters.endDate,
5487
5488
  ...filters.operators,
5488
5489
  ...filters.taskTypes,
5489
5490
  ...filters.businessUnits,
5490
- // Não contar status como filtro ativo se for o padrão
5491
- ...JSON.stringify([...filters.status].sort()) !== JSON.stringify([...defaultStatus].sort()) ? filters.status : []
5492
- ].filter((value) => value !== "").length;
5493
- return /* @__PURE__ */ jsxs("div", { className: "bg-white border-b border-gray-200 p-4 space-y-4", children: [
5494
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
5495
- /* @__PURE__ */ jsx("div", { className: "relative flex-shrink-0", children: /* @__PURE__ */ jsx(
5496
- Input,
5497
- {
5498
- placeholder: "Buscar por placa...",
5499
- value: filters.vehicleId,
5500
- onChange: (e) => updateFilter("vehicleId", e.target.value),
5501
- leftIcon: /* @__PURE__ */ jsx(Search, { className: "w-4 h-4" }),
5502
- rightIcon: filters.vehicleId ? /* @__PURE__ */ jsx(
5503
- Button,
5504
- {
5505
- variant: "ghost",
5506
- size: "sm",
5507
- onClick: () => clearFilter("vehicleId"),
5508
- className: "h-6 w-6 p-0 hover:bg-gray-100 -mr-2",
5509
- children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
5510
- }
5511
- ) : void 0,
5512
- className: "w-48",
5513
- showValidationIcon: false
5514
- }
5515
- ) }),
5516
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
5517
- /* @__PURE__ */ jsx(
5518
- Input,
5519
- {
5520
- type: "date",
5521
- placeholder: "Data inicial",
5522
- value: filters.startDate,
5523
- onChange: (e) => updateFilter("startDate", e.target.value),
5524
- className: "w-30 h-10 px-3"
5525
- }
5526
- ),
5527
- /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: "at\xE9" }),
5528
- /* @__PURE__ */ jsx(
5529
- Input,
5530
- {
5531
- type: "date",
5532
- placeholder: "Data final",
5533
- value: filters.endDate,
5534
- onChange: (e) => updateFilter("endDate", e.target.value),
5535
- className: "w-30 h-10 px-3"
5536
- }
5537
- ),
5538
- (filters.startDate || filters.endDate) && /* @__PURE__ */ jsx(
5539
- Button,
5540
- {
5541
- variant: "ghost",
5542
- size: "sm",
5543
- onClick: () => {
5544
- clearFilter("startDate");
5545
- clearFilter("endDate");
5546
- },
5547
- className: "h-6 w-6 p-0 hover:bg-gray-100 flex items-center justify-center ml-0",
5548
- children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
5549
- }
5550
- )
5551
- ] }),
5552
- /* @__PURE__ */ jsx(Separator5, { orientation: "vertical", className: "h-8" }),
5553
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
5554
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-gray-700", children: "Tipo:" }),
5555
- /* @__PURE__ */ jsxs(
5556
- ToggleGroup,
5557
- {
5558
- type: "single",
5559
- value: filters.operatorType,
5560
- onValueChange: (value) => updateFilter("operatorType", value || ""),
5561
- className: "border rounded-md p-0.5 h-10",
5562
- children: [
5563
- /* @__PURE__ */ jsxs(ToggleGroupItem, { value: "ia", className: "flex items-center gap-1 text-xs h-9", children: [
5564
- /* @__PURE__ */ jsx(Bot, { className: "w-3 h-3" }),
5565
- "IA"
5566
- ] }),
5567
- /* @__PURE__ */ jsxs(ToggleGroupItem, { value: "humano", className: "flex items-center gap-1 text-xs h-9", children: [
5568
- /* @__PURE__ */ jsx(User, { className: "w-3 h-3" }),
5569
- "Humano"
5570
- ] })
5571
- ]
5572
- }
5573
- )
5574
- ] }),
5575
- /* @__PURE__ */ jsx(Separator5, { orientation: "vertical", className: "h-8" }),
5576
- /* @__PURE__ */ jsxs(
5577
- Popover,
5578
- {
5579
- open: openPopovers.status,
5580
- onOpenChange: (open) => setOpenPopovers((prev) => ({ ...prev, status: open })),
5581
- children: [
5582
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "relative h-10", children: [
5583
- /* @__PURE__ */ jsx(AlertCircle, { className: "w-4 h-4 mr-2" }),
5584
- "Status",
5585
- 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 })
5586
- ] }) }),
5587
- /* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-4 bg-white border shadow-lg", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
5588
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
5589
- /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-800", children: "Status" }),
5590
- /* @__PURE__ */ jsx(
5591
- Button,
5592
- {
5593
- variant: "ghost",
5594
- size: "sm",
5595
- onClick: () => clearFilter("status"),
5596
- className: "text-gray-500 hover:text-gray-700",
5597
- children: "Padr\xE3o"
5598
- }
5599
- )
5600
- ] }),
5601
- /* @__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: [
5602
- /* @__PURE__ */ jsx(
5603
- Checkbox,
5604
- {
5605
- id: `status-${status.value}`,
5606
- checked: filters.status.includes(status.value),
5607
- onCheckedChange: () => toggleArrayFilter("status", status.value)
5608
- }
5609
- ),
5610
- /* @__PURE__ */ jsx(
5611
- "label",
5612
- {
5613
- htmlFor: `status-${status.value}`,
5614
- className: "text-sm cursor-pointer flex-1",
5615
- children: status.label
5616
- }
5617
- )
5618
- ] }, status.value)) })
5619
- ] }) })
5620
- ]
5621
- }
5622
- ),
5623
- /* @__PURE__ */ jsxs(
5624
- Popover,
5625
- {
5626
- open: openPopovers.businessUnits,
5627
- onOpenChange: (open) => setOpenPopovers((prev) => ({ ...prev, businessUnits: open })),
5628
- children: [
5629
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "relative h-10", children: [
5630
- /* @__PURE__ */ jsx(Building2, { className: "w-4 h-4 mr-2" }),
5631
- "Unidades",
5632
- 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 })
5633
- ] }) }),
5634
- /* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-4 bg-white border shadow-lg", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
5635
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
5636
- /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-800", children: "Unidades de Neg\xF3cio" }),
5637
- filters.businessUnits.length > 0 && /* @__PURE__ */ jsx(
5638
- Button,
5639
- {
5640
- variant: "ghost",
5641
- size: "sm",
5642
- onClick: () => clearFilter("businessUnits"),
5643
- className: "text-gray-500 hover:text-gray-700",
5644
- children: "Limpar"
5645
- }
5646
- )
5647
- ] }),
5648
- /* @__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: [
5649
- /* @__PURE__ */ jsx(
5650
- Checkbox,
5651
- {
5652
- id: `unit-${unit.codigo}`,
5653
- checked: filters.businessUnits.includes(unit.codigo),
5654
- onCheckedChange: () => toggleArrayFilter("businessUnits", unit.codigo)
5655
- }
5656
- ),
5657
- /* @__PURE__ */ jsx(
5658
- "label",
5659
- {
5660
- htmlFor: `unit-${unit.codigo}`,
5661
- className: "text-sm cursor-pointer flex-1",
5662
- children: unit.descricao
5663
- }
5664
- )
5665
- ] }, unit.codigo)) })
5666
- ] }) })
5667
- ]
5668
- }
5669
- ),
5670
- /* @__PURE__ */ jsxs(
5671
- Popover,
5672
- {
5673
- open: openPopovers.operators,
5674
- onOpenChange: (open) => setOpenPopovers((prev) => ({ ...prev, operators: open })),
5675
- children: [
5676
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "relative h-10", children: [
5677
- /* @__PURE__ */ jsx(UserCheck, { className: "w-4 h-4 mr-2" }),
5678
- "Usu\xE1rios",
5679
- 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 })
5680
- ] }) }),
5681
- /* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-4 bg-white border shadow-lg", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
5682
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
5683
- /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-800", children: "Usu\xE1rios" }),
5684
- filters.operators.length > 0 && /* @__PURE__ */ jsx(
5685
- Button,
5686
- {
5687
- variant: "ghost",
5688
- size: "sm",
5689
- onClick: () => clearFilter("operators"),
5690
- className: "text-gray-500 hover:text-gray-700",
5691
- children: "Limpar"
5692
- }
5693
- )
5694
- ] }),
5695
- /* @__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: [
5696
- /* @__PURE__ */ jsx(
5697
- Checkbox,
5698
- {
5699
- id: `operator-${operator}`,
5700
- checked: filters.operators.includes(operator),
5701
- onCheckedChange: () => toggleArrayFilter("operators", operator)
5702
- }
5703
- ),
5704
- /* @__PURE__ */ jsx(
5705
- "label",
5706
- {
5707
- htmlFor: `operator-${operator}`,
5708
- className: "text-sm cursor-pointer flex-1",
5709
- children: operator
5710
- }
5711
- )
5712
- ] }, operator)) })
5713
- ] }) })
5714
- ]
5715
- }
5716
- ),
5717
- /* @__PURE__ */ jsxs(
5718
- Popover,
5719
- {
5720
- open: openPopovers.taskTypes,
5721
- onOpenChange: (open) => setOpenPopovers((prev) => ({ ...prev, taskTypes: open })),
5722
- children: [
5723
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "relative h-10", children: [
5724
- /* @__PURE__ */ jsx(ClipboardList, { className: "w-4 h-4 mr-2" }),
5725
- "Tipos de Tarefa",
5726
- 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 })
5727
- ] }) }),
5728
- /* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-4 bg-white border shadow-lg", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
5729
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
5730
- /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-800", children: "Tipos de Tarefa" }),
5731
- filters.taskTypes.length > 0 && /* @__PURE__ */ jsx(
5732
- Button,
5733
- {
5734
- variant: "ghost",
5735
- size: "sm",
5736
- onClick: () => clearFilter("taskTypes"),
5737
- className: "text-gray-500 hover:text-gray-700",
5738
- children: "Limpar"
5739
- }
5740
- )
5741
- ] }),
5742
- /* @__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: [
5743
- /* @__PURE__ */ jsx(
5744
- Checkbox,
5745
- {
5746
- id: `task-${taskType}`,
5747
- checked: filters.taskTypes.includes(taskType),
5748
- onCheckedChange: () => toggleArrayFilter("taskTypes", taskType)
5749
- }
5750
- ),
5751
- /* @__PURE__ */ jsx(
5752
- "label",
5753
- {
5754
- htmlFor: `task-${taskType}`,
5755
- className: "text-sm cursor-pointer flex-1",
5756
- children: taskType
5757
- }
5758
- )
5759
- ] }, taskType)) })
5760
- ] }) })
5761
- ]
5762
- }
5763
- ),
5764
- activeFiltersCount > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
5491
+ ...isNonDefaultStatus ? filters.status : []
5492
+ ].filter((v) => v !== "").length;
5493
+ const StatusSection = () => /* @__PURE__ */ jsx("div", { className: "space-y-2", children: statusOptions.map((s) => /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
5494
+ /* @__PURE__ */ jsx(
5495
+ Checkbox,
5496
+ {
5497
+ id: `status-${s.value}`,
5498
+ checked: filters.status.includes(s.value),
5499
+ onCheckedChange: () => toggleArrayFilter("status", s.value)
5500
+ }
5501
+ ),
5502
+ /* @__PURE__ */ jsx("label", { htmlFor: `status-${s.value}`, className: "text-sm cursor-pointer flex-1", children: s.label })
5503
+ ] }, s.value)) });
5504
+ const UnidadesSection = () => /* @__PURE__ */ jsx("div", { className: "space-y-2", children: businessUnits.map((u) => /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
5505
+ /* @__PURE__ */ jsx(
5506
+ Checkbox,
5507
+ {
5508
+ id: `unit-${u.codigo}`,
5509
+ checked: filters.businessUnits.includes(u.codigo),
5510
+ onCheckedChange: () => toggleArrayFilter("businessUnits", u.codigo)
5511
+ }
5512
+ ),
5513
+ /* @__PURE__ */ jsx("label", { htmlFor: `unit-${u.codigo}`, className: "text-sm cursor-pointer flex-1", children: u.descricao })
5514
+ ] }, u.codigo)) });
5515
+ const OperatorsSection = () => /* @__PURE__ */ jsx("div", { className: "space-y-2", children: operators.map((op) => /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
5516
+ /* @__PURE__ */ jsx(
5517
+ Checkbox,
5518
+ {
5519
+ id: `op-${op}`,
5520
+ checked: filters.operators.includes(op),
5521
+ onCheckedChange: () => toggleArrayFilter("operators", op)
5522
+ }
5523
+ ),
5524
+ /* @__PURE__ */ jsx("label", { htmlFor: `op-${op}`, className: "text-sm cursor-pointer flex-1", children: op })
5525
+ ] }, op)) });
5526
+ const TaskTypesSection = () => /* @__PURE__ */ jsx("div", { className: "space-y-2", children: taskTypes.map((t) => /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
5527
+ /* @__PURE__ */ jsx(
5528
+ Checkbox,
5529
+ {
5530
+ id: `task-${t}`,
5531
+ checked: filters.taskTypes.includes(t),
5532
+ onCheckedChange: () => toggleArrayFilter("taskTypes", t)
5533
+ }
5534
+ ),
5535
+ /* @__PURE__ */ jsx("label", { htmlFor: `task-${t}`, className: "text-sm cursor-pointer flex-1", children: t })
5536
+ ] }, t)) });
5537
+ const ActiveChips = () => /* @__PURE__ */ jsxs(Fragment, { children: [
5538
+ filters.operatorType && /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
5539
+ "Tipo: ",
5540
+ filters.operatorType === "ia" ? "IA" : "Humano",
5541
+ /* @__PURE__ */ jsx("button", { onClick: () => clearFilter("operatorType"), className: "ml-1 hover:text-red-500", children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" }) })
5542
+ ] }),
5543
+ isNonDefaultStatus && filters.status.map((s) => {
5544
+ const label = statusOptions.find((o) => o.value === s)?.label || s;
5545
+ return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
5546
+ label,
5547
+ /* @__PURE__ */ jsx("button", { onClick: () => toggleArrayFilter("status", s), className: "ml-1 hover:text-red-500", children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" }) })
5548
+ ] }, s);
5549
+ }),
5550
+ filters.businessUnits.map((c) => /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
5551
+ businessUnits.find((u) => u.codigo === c)?.descricao ?? c,
5552
+ /* @__PURE__ */ jsx("button", { onClick: () => toggleArrayFilter("businessUnits", c), className: "ml-1 hover:text-red-500", children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" }) })
5553
+ ] }, c)),
5554
+ filters.operators.map((op) => /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
5555
+ op,
5556
+ /* @__PURE__ */ jsx("button", { onClick: () => toggleArrayFilter("operators", op), className: "ml-1 hover:text-red-500", children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" }) })
5557
+ ] }, op)),
5558
+ filters.taskTypes.map((t) => /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
5559
+ t,
5560
+ /* @__PURE__ */ jsx("button", { onClick: () => toggleArrayFilter("taskTypes", t), className: "ml-1 hover:text-red-500", children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" }) })
5561
+ ] }, t))
5562
+ ] });
5563
+ if (variant === "default") {
5564
+ return /* @__PURE__ */ jsxs("div", { className: cn("bg-white border-b border-gray-200 p-4 space-y-4", className), children: [
5565
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
5566
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
5567
+ /* @__PURE__ */ jsx(Input, { type: "date", value: filters.startDate, onChange: (e) => updateFilter("startDate", e.target.value), className: "w-30 h-10 px-3" }),
5568
+ /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: "at\xE9" }),
5569
+ /* @__PURE__ */ jsx(Input, { type: "date", value: filters.endDate, onChange: (e) => updateFilter("endDate", e.target.value), className: "w-30 h-10 px-3" }),
5570
+ (filters.startDate || filters.endDate) && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: () => {
5571
+ clearFilter("startDate");
5572
+ clearFilter("endDate");
5573
+ }, className: "h-6 w-6 p-0", children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" }) })
5574
+ ] }),
5765
5575
  /* @__PURE__ */ jsx(Separator5, { orientation: "vertical", className: "h-8" }),
5766
- /* @__PURE__ */ jsxs(
5767
- Button,
5768
- {
5769
- variant: "ghost",
5770
- size: "sm",
5771
- onClick: clearAllFilters,
5772
- className: "text-gray-500 hover:text-gray-700",
5773
- children: [
5774
- /* @__PURE__ */ jsx(X, { className: "w-4 h-4 mr-1" }),
5775
- "Limpar todos"
5776
- ]
5777
- }
5778
- )
5576
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
5577
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-gray-700", children: "Tipo:" }),
5578
+ /* @__PURE__ */ jsxs(ToggleGroup, { type: "single", value: filters.operatorType, onValueChange: (v) => updateFilter("operatorType", v || ""), className: "border rounded-md p-0.5 h-10", children: [
5579
+ /* @__PURE__ */ jsxs(ToggleGroupItem, { value: "ia", className: "flex items-center gap-1 text-xs h-9", children: [
5580
+ /* @__PURE__ */ jsx(Bot, { className: "w-3 h-3" }),
5581
+ "IA"
5582
+ ] }),
5583
+ /* @__PURE__ */ jsxs(ToggleGroupItem, { value: "humano", className: "flex items-center gap-1 text-xs h-9", children: [
5584
+ /* @__PURE__ */ jsx(User, { className: "w-3 h-3" }),
5585
+ "Humano"
5586
+ ] })
5587
+ ] })
5588
+ ] }),
5589
+ /* @__PURE__ */ jsx(Separator5, { orientation: "vertical", className: "h-8" }),
5590
+ [
5591
+ { key: "status", label: "Status", icon: /* @__PURE__ */ jsx(AlertCircle, { className: "w-4 h-4 mr-2" }), count: isNonDefaultStatus ? filters.status.length : 0, section: /* @__PURE__ */ jsx(StatusSection, {}) },
5592
+ { key: "businessUnits", label: "Unidades", icon: /* @__PURE__ */ jsx(Building2, { className: "w-4 h-4 mr-2" }), count: filters.businessUnits.length, section: /* @__PURE__ */ jsx(UnidadesSection, {}) },
5593
+ { key: "operators", label: "Usu\xE1rios", icon: /* @__PURE__ */ jsx(UserCheck, { className: "w-4 h-4 mr-2" }), count: filters.operators.length, section: /* @__PURE__ */ jsx(OperatorsSection, {}) },
5594
+ { key: "taskTypes", label: "Tarefas", icon: /* @__PURE__ */ jsx(ClipboardList, { className: "w-4 h-4 mr-2" }), count: filters.taskTypes.length, section: /* @__PURE__ */ jsx(TaskTypesSection, {}) }
5595
+ ].map(({ key, label, icon, count: count2, section }) => /* @__PURE__ */ jsxs(Popover, { open: openPopovers[key], onOpenChange: (o) => setOpenPopovers((p) => ({ ...p, [key]: o })), children: [
5596
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", className: "relative h-10", children: [
5597
+ icon,
5598
+ label,
5599
+ count2 > 0 && /* @__PURE__ */ jsx(Badge, { variant: "destructive", className: "ml-2 h-5 w-5 p-0 text-xs flex items-center justify-center", children: count2 })
5600
+ ] }) }),
5601
+ /* @__PURE__ */ jsxs(PopoverContent, { className: "w-72 p-4 bg-white border shadow-lg", align: "start", children: [
5602
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
5603
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-800", children: label }),
5604
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: () => clearFilter(key), className: "text-gray-500 hover:text-gray-700 text-xs", children: "Limpar" })
5605
+ ] }),
5606
+ /* @__PURE__ */ jsx("div", { className: "max-h-60 overflow-y-auto", children: section })
5607
+ ] })
5608
+ ] }, key)),
5609
+ activeFiltersCount > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
5610
+ /* @__PURE__ */ jsx(Separator5, { orientation: "vertical", className: "h-8" }),
5611
+ /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "sm", onClick: clearAllFilters, className: "text-gray-500 hover:text-gray-700", children: [
5612
+ /* @__PURE__ */ jsx(X, { className: "w-4 h-4 mr-1" }),
5613
+ "Limpar todos"
5614
+ ] })
5615
+ ] })
5616
+ ] }),
5617
+ activeFiltersCount > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
5618
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-600", children: "Filtros ativos:" }),
5619
+ /* @__PURE__ */ jsx(ActiveChips, {})
5779
5620
  ] })
5780
- ] }),
5781
- activeFiltersCount > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
5782
- /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-600", children: "Filtros ativos:" }),
5783
- filters.vehicleId && /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
5784
- "Placa: ",
5785
- filters.vehicleId,
5786
- /* @__PURE__ */ jsx(
5787
- Button,
5788
- {
5789
- variant: "ghost",
5790
- size: "sm",
5791
- onClick: () => clearFilter("vehicleId"),
5792
- className: "icon-size p-0 hover:bg-gray-200 ml-1",
5793
- children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
5794
- }
5795
- )
5621
+ ] });
5622
+ }
5623
+ if (variant === "chips") {
5624
+ return /* @__PURE__ */ jsxs("div", { className: cn("border-b border-gray-100 px-4 py-2 space-y-1.5", className), children: [
5625
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
5626
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 flex-shrink-0", children: [
5627
+ /* @__PURE__ */ jsx(Input, { type: "date", value: filters.startDate, onChange: (e) => updateFilter("startDate", e.target.value), className: "h-7 text-xs px-2 w-28 border-gray-200" }),
5628
+ /* @__PURE__ */ jsx("span", { className: "text-gray-300 text-xs", children: "\u2013" }),
5629
+ /* @__PURE__ */ jsx(Input, { type: "date", value: filters.endDate, onChange: (e) => updateFilter("endDate", e.target.value), className: "h-7 text-xs px-2 w-28 border-gray-200" }),
5630
+ (filters.startDate || filters.endDate) && /* @__PURE__ */ jsx("button", { onClick: () => {
5631
+ clearFilter("startDate");
5632
+ clearFilter("endDate");
5633
+ }, className: "text-gray-400 hover:text-gray-600", children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" }) })
5634
+ ] }),
5635
+ /* @__PURE__ */ jsx(Separator5, { orientation: "vertical", className: "h-5 mx-0.5" }),
5636
+ /* @__PURE__ */ jsxs(ToggleGroup, { type: "single", value: filters.operatorType, onValueChange: (v) => updateFilter("operatorType", v || ""), className: "gap-1", children: [
5637
+ /* @__PURE__ */ jsxs(ToggleGroupItem, { value: "ia", className: "h-7 px-2.5 text-xs rounded-full data-[state=on]:bg-blue-100 data-[state=on]:text-blue-700 border-0 bg-gray-100 hover:bg-gray-200", children: [
5638
+ /* @__PURE__ */ jsx(Bot, { className: "w-3 h-3 mr-1" }),
5639
+ "IA"
5640
+ ] }),
5641
+ /* @__PURE__ */ jsxs(ToggleGroupItem, { value: "humano", className: "h-7 px-2.5 text-xs rounded-full data-[state=on]:bg-emerald-100 data-[state=on]:text-emerald-700 border-0 bg-gray-100 hover:bg-gray-200", children: [
5642
+ /* @__PURE__ */ jsx(User, { className: "w-3 h-3 mr-1" }),
5643
+ "Humano"
5644
+ ] })
5645
+ ] }),
5646
+ /* @__PURE__ */ jsx(Separator5, { orientation: "vertical", className: "h-5 mx-0.5" }),
5647
+ [
5648
+ { key: "status", label: "Status", icon: /* @__PURE__ */ jsx(AlertCircle, { className: "w-3 h-3" }), count: isNonDefaultStatus ? filters.status.length : 0, section: /* @__PURE__ */ jsx(StatusSection, {}) },
5649
+ { key: "businessUnits", label: "Unidades", icon: /* @__PURE__ */ jsx(Building2, { className: "w-3 h-3" }), count: filters.businessUnits.length, section: /* @__PURE__ */ jsx(UnidadesSection, {}) },
5650
+ { key: "operators", label: "Usu\xE1rios", icon: /* @__PURE__ */ jsx(UserCheck, { className: "w-3 h-3" }), count: filters.operators.length, section: /* @__PURE__ */ jsx(OperatorsSection, {}) },
5651
+ { key: "taskTypes", label: "Tarefas", icon: /* @__PURE__ */ jsx(ClipboardList, { className: "w-3 h-3" }), count: filters.taskTypes.length, section: /* @__PURE__ */ jsx(TaskTypesSection, {}) }
5652
+ ].map(({ key, label, icon, count: count2, section }) => /* @__PURE__ */ jsxs(Popover, { open: openPopovers[key], onOpenChange: (o) => setOpenPopovers((p) => ({ ...p, [key]: o })), children: [
5653
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("button", { className: `inline-flex items-center gap-1 h-7 px-2.5 rounded-full text-xs font-medium transition-colors ${count2 > 0 ? "bg-blue-100 text-blue-700" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`, children: [
5654
+ icon,
5655
+ label,
5656
+ count2 > 0 && /* @__PURE__ */ jsx("span", { className: "ml-0.5 bg-blue-600 text-white rounded-full w-4 h-4 flex items-center justify-center text-[10px]", children: count2 }),
5657
+ /* @__PURE__ */ jsx(ChevronDown, { className: "w-3 h-3 opacity-50" })
5658
+ ] }) }),
5659
+ /* @__PURE__ */ jsxs(PopoverContent, { className: "w-72 p-4 bg-white border shadow-lg", align: "start", children: [
5660
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
5661
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-800 text-sm", children: label }),
5662
+ /* @__PURE__ */ jsx("button", { onClick: () => clearFilter(key), className: "text-xs text-gray-400 hover:text-gray-600", children: "Limpar" })
5663
+ ] }),
5664
+ /* @__PURE__ */ jsx("div", { className: "max-h-60 overflow-y-auto", children: section })
5665
+ ] })
5666
+ ] }, key)),
5667
+ activeFiltersCount > 0 && /* @__PURE__ */ jsxs("button", { onClick: clearAllFilters, className: "inline-flex items-center gap-1 h-7 px-2.5 rounded-full text-xs text-gray-400 hover:text-red-500 hover:bg-red-50 transition-colors", children: [
5668
+ /* @__PURE__ */ jsx(X, { className: "w-3 h-3" }),
5669
+ "Limpar"
5670
+ ] })
5796
5671
  ] }),
5797
- filters.operatorType && /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
5798
- "Tipo: ",
5799
- filters.operatorType === "ia" ? "IA" : "Humano",
5800
- /* @__PURE__ */ jsx(
5801
- Button,
5802
- {
5803
- variant: "ghost",
5804
- size: "sm",
5805
- onClick: () => clearFilter("operatorType"),
5806
- className: "icon-size p-0 hover:bg-gray-200 ml-1",
5807
- children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
5808
- }
5809
- )
5672
+ activeFiltersCount > 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: /* @__PURE__ */ jsx(ActiveChips, {}) })
5673
+ ] });
5674
+ }
5675
+ if (variant === "minimal") {
5676
+ return /* @__PURE__ */ jsxs("div", { className: cn("px-6 py-2 space-y-1", className), children: [
5677
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-wrap text-sm text-gray-500", children: [
5678
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
5679
+ /* @__PURE__ */ jsx(Input, { type: "date", value: filters.startDate, onChange: (e) => updateFilter("startDate", e.target.value), className: "h-7 text-xs px-2 w-28 border-0 bg-transparent shadow-none focus-visible:ring-0 text-gray-600 p-0" }),
5680
+ /* @__PURE__ */ jsx("span", { className: "text-gray-300", children: "\u2013" }),
5681
+ /* @__PURE__ */ jsx(Input, { type: "date", value: filters.endDate, onChange: (e) => updateFilter("endDate", e.target.value), className: "h-7 text-xs px-2 w-28 border-0 bg-transparent shadow-none focus-visible:ring-0 text-gray-600 p-0" }),
5682
+ (filters.startDate || filters.endDate) && /* @__PURE__ */ jsx("button", { onClick: () => {
5683
+ clearFilter("startDate");
5684
+ clearFilter("endDate");
5685
+ }, className: "text-gray-300 hover:text-gray-500", children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" }) })
5686
+ ] }),
5687
+ /* @__PURE__ */ jsx("span", { className: "text-gray-200", children: "|" }),
5688
+ /* @__PURE__ */ jsxs(ToggleGroup, { type: "single", value: filters.operatorType, onValueChange: (v) => updateFilter("operatorType", v || ""), className: "gap-0.5", children: [
5689
+ /* @__PURE__ */ jsxs(ToggleGroupItem, { value: "ia", className: "h-7 px-2 text-xs border-0 bg-transparent text-gray-500 hover:text-gray-800 data-[state=on]:bg-gray-100 data-[state=on]:text-gray-800 rounded", children: [
5690
+ /* @__PURE__ */ jsx(Bot, { className: "w-3 h-3 mr-1" }),
5691
+ "IA"
5692
+ ] }),
5693
+ /* @__PURE__ */ jsxs(ToggleGroupItem, { value: "humano", className: "h-7 px-2 text-xs border-0 bg-transparent text-gray-500 hover:text-gray-800 data-[state=on]:bg-gray-100 data-[state=on]:text-gray-800 rounded", children: [
5694
+ /* @__PURE__ */ jsx(User, { className: "w-3 h-3 mr-1" }),
5695
+ "Humano"
5696
+ ] })
5697
+ ] }),
5698
+ /* @__PURE__ */ jsx("span", { className: "text-gray-200", children: "|" }),
5699
+ [
5700
+ { key: "status", label: "Status", count: isNonDefaultStatus ? filters.status.length : 0, section: /* @__PURE__ */ jsx(StatusSection, {}) },
5701
+ { key: "businessUnits", label: "Unidades", count: filters.businessUnits.length, section: /* @__PURE__ */ jsx(UnidadesSection, {}) },
5702
+ { key: "operators", label: "Usu\xE1rios", count: filters.operators.length, section: /* @__PURE__ */ jsx(OperatorsSection, {}) },
5703
+ { key: "taskTypes", label: "Tarefas", count: filters.taskTypes.length, section: /* @__PURE__ */ jsx(TaskTypesSection, {}) }
5704
+ ].map(({ key, label, count: count2, section }) => /* @__PURE__ */ jsxs(Popover, { open: openPopovers[key], onOpenChange: (o) => setOpenPopovers((p) => ({ ...p, [key]: o })), children: [
5705
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("button", { className: `inline-flex items-center gap-1 text-xs hover:text-gray-800 transition-colors ${count2 > 0 ? "text-blue-600 font-medium" : "text-gray-500"}`, children: [
5706
+ label,
5707
+ count2 > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[10px] font-semibold", children: [
5708
+ "(",
5709
+ count2,
5710
+ ")"
5711
+ ] }),
5712
+ /* @__PURE__ */ jsx(ChevronDown, { className: "w-3 h-3 opacity-40" })
5713
+ ] }) }),
5714
+ /* @__PURE__ */ jsxs(PopoverContent, { className: "w-72 p-4 bg-white border shadow-lg", align: "start", children: [
5715
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
5716
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-800 text-sm", children: label }),
5717
+ /* @__PURE__ */ jsx("button", { onClick: () => clearFilter(key), className: "text-xs text-gray-400 hover:text-gray-600", children: "Limpar" })
5718
+ ] }),
5719
+ /* @__PURE__ */ jsx("div", { className: "max-h-60 overflow-y-auto", children: section })
5720
+ ] })
5721
+ ] }, key)),
5722
+ activeFiltersCount > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
5723
+ /* @__PURE__ */ jsx("span", { className: "text-gray-200", children: "|" }),
5724
+ /* @__PURE__ */ jsx("button", { onClick: clearAllFilters, className: "text-xs text-gray-400 hover:text-red-500 transition-colors", children: "Limpar tudo" })
5725
+ ] })
5810
5726
  ] }),
5811
- filters.status.length > 0 && filters.status.map((status) => {
5812
- const statusLabel = statusOptions.find((s) => s.value === status)?.label || status;
5813
- return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
5814
- "Status: ",
5815
- statusLabel,
5816
- /* @__PURE__ */ jsx(
5817
- Button,
5818
- {
5819
- variant: "ghost",
5820
- size: "sm",
5821
- onClick: () => toggleArrayFilter("status", status),
5822
- className: "icon-size p-0 hover:bg-gray-200 ml-1",
5823
- children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
5824
- }
5825
- )
5826
- ] }, status);
5827
- }),
5828
- filters.businessUnits.map((unitCodigo) => {
5829
- const unit = businessUnits.find((u) => u.codigo === unitCodigo);
5830
- return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
5831
- "Unidade: ",
5832
- unit?.descricao,
5833
- /* @__PURE__ */ jsx(
5834
- Button,
5835
- {
5836
- variant: "ghost",
5837
- size: "sm",
5838
- onClick: () => toggleArrayFilter("businessUnits", unitCodigo),
5839
- className: "icon-size p-0 hover:bg-gray-200 ml-1",
5840
- children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
5841
- }
5842
- )
5843
- ] }, unitCodigo);
5844
- }),
5845
- filters.operators.map((operator) => /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
5846
- "Operador: ",
5847
- operator,
5848
- /* @__PURE__ */ jsx(
5849
- Button,
5850
- {
5851
- variant: "ghost",
5852
- size: "sm",
5853
- onClick: () => toggleArrayFilter("operators", operator),
5854
- className: "icon-size p-0 hover:bg-gray-200 ml-1",
5855
- children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
5856
- }
5857
- )
5858
- ] }, operator)),
5859
- filters.taskTypes.map((taskType) => /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [
5860
- "Tipo: ",
5861
- taskType,
5862
- /* @__PURE__ */ jsx(
5863
- Button,
5864
- {
5865
- variant: "ghost",
5866
- size: "sm",
5867
- onClick: () => toggleArrayFilter("taskTypes", taskType),
5868
- className: "icon-size p-0 hover:bg-gray-200 ml-1",
5869
- children: /* @__PURE__ */ jsx(X, { className: "w-3 h-3" })
5870
- }
5871
- )
5872
- ] }, taskType))
5873
- ] })
5727
+ activeFiltersCount > 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: /* @__PURE__ */ jsx(ActiveChips, {}) })
5728
+ ] });
5729
+ }
5730
+ return /* @__PURE__ */ jsxs("div", { className: cn("px-6 py-2 flex items-center gap-2 flex-wrap", className), children: [
5731
+ /* @__PURE__ */ jsxs(Popover, { open: openPopovers.all, onOpenChange: (o) => setOpenPopovers((p) => ({ ...p, all: o })), children: [
5732
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("button", { className: `inline-flex items-center gap-1.5 h-8 px-3 rounded-md text-sm border transition-colors ${activeFiltersCount > 0 ? "border-blue-300 bg-blue-50 text-blue-700" : "border-gray-200 bg-white text-gray-600 hover:bg-gray-50"}`, children: [
5733
+ /* @__PURE__ */ jsx(Filter, { className: "w-3.5 h-3.5" }),
5734
+ "Filtros",
5735
+ activeFiltersCount > 0 && /* @__PURE__ */ jsx("span", { className: "bg-blue-600 text-white rounded-full w-4 h-4 flex items-center justify-center text-[10px] font-semibold", children: activeFiltersCount }),
5736
+ /* @__PURE__ */ jsx(ChevronDown, { className: "w-3 h-3 opacity-40" })
5737
+ ] }) }),
5738
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-80 p-0 bg-white border shadow-lg", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "max-h-[60vh] overflow-y-auto p-4 space-y-4", children: [
5739
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
5740
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-800 text-sm", children: "Filtros" }),
5741
+ activeFiltersCount > 0 && /* @__PURE__ */ jsx("button", { onClick: clearAllFilters, className: "text-xs text-gray-400 hover:text-red-500 transition-colors", children: "Limpar tudo" })
5742
+ ] }),
5743
+ /* @__PURE__ */ jsxs("div", { children: [
5744
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wide mb-2", children: "Per\xEDodo" }),
5745
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
5746
+ /* @__PURE__ */ jsx(Input, { type: "date", value: filters.startDate, onChange: (e) => updateFilter("startDate", e.target.value), className: "h-8 text-xs px-2 flex-1" }),
5747
+ /* @__PURE__ */ jsx("span", { className: "text-gray-300 text-xs", children: "\u2013" }),
5748
+ /* @__PURE__ */ jsx(Input, { type: "date", value: filters.endDate, onChange: (e) => updateFilter("endDate", e.target.value), className: "h-8 text-xs px-2 flex-1" })
5749
+ ] })
5750
+ ] }),
5751
+ /* @__PURE__ */ jsx(Separator5, {}),
5752
+ /* @__PURE__ */ jsxs("div", { children: [
5753
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wide mb-2", children: "Tipo de Operador" }),
5754
+ /* @__PURE__ */ jsxs(ToggleGroup, { type: "single", value: filters.operatorType, onValueChange: (v) => updateFilter("operatorType", v || ""), className: "gap-1 justify-start", children: [
5755
+ /* @__PURE__ */ jsxs(ToggleGroupItem, { value: "ia", className: "h-7 px-3 text-xs rounded-md border data-[state=on]:bg-blue-100 data-[state=on]:text-blue-700 data-[state=on]:border-blue-300", children: [
5756
+ /* @__PURE__ */ jsx(Bot, { className: "w-3 h-3 mr-1" }),
5757
+ "IA"
5758
+ ] }),
5759
+ /* @__PURE__ */ jsxs(ToggleGroupItem, { value: "humano", className: "h-7 px-3 text-xs rounded-md border data-[state=on]:bg-emerald-100 data-[state=on]:text-emerald-700 data-[state=on]:border-emerald-300", children: [
5760
+ /* @__PURE__ */ jsx(User, { className: "w-3 h-3 mr-1" }),
5761
+ "Humano"
5762
+ ] })
5763
+ ] })
5764
+ ] }),
5765
+ /* @__PURE__ */ jsx(Separator5, {}),
5766
+ /* @__PURE__ */ jsxs("div", { children: [
5767
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wide mb-2", children: "Status" }),
5768
+ /* @__PURE__ */ jsx("div", { className: "max-h-32 overflow-y-auto", children: /* @__PURE__ */ jsx(StatusSection, {}) })
5769
+ ] }),
5770
+ /* @__PURE__ */ jsx(Separator5, {}),
5771
+ /* @__PURE__ */ jsxs("div", { children: [
5772
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wide mb-2", children: "Unidades de Neg\xF3cio" }),
5773
+ /* @__PURE__ */ jsx("div", { className: "max-h-32 overflow-y-auto", children: /* @__PURE__ */ jsx(UnidadesSection, {}) })
5774
+ ] }),
5775
+ operators.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
5776
+ /* @__PURE__ */ jsx(Separator5, {}),
5777
+ /* @__PURE__ */ jsxs("div", { children: [
5778
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wide mb-2", children: "Usu\xE1rios" }),
5779
+ /* @__PURE__ */ jsx("div", { className: "max-h-32 overflow-y-auto", children: /* @__PURE__ */ jsx(OperatorsSection, {}) })
5780
+ ] })
5781
+ ] }),
5782
+ taskTypes.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
5783
+ /* @__PURE__ */ jsx(Separator5, {}),
5784
+ /* @__PURE__ */ jsxs("div", { children: [
5785
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wide mb-2", children: "Tipos de Tarefa" }),
5786
+ /* @__PURE__ */ jsx("div", { className: "max-h-32 overflow-y-auto", children: /* @__PURE__ */ jsx(TaskTypesSection, {}) })
5787
+ ] })
5788
+ ] })
5789
+ ] }) })
5790
+ ] }),
5791
+ activeFiltersCount > 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: /* @__PURE__ */ jsx(ActiveChips, {}) })
5874
5792
  ] });
5875
5793
  };
5876
5794
  var FilterBar_default = FilterBar;
@@ -6959,7 +6877,10 @@ var StatusIndicator = ({ status, count: count2, label, onClick }) => {
6959
6877
  );
6960
6878
  };
6961
6879
  var StatusIndicator_default = StatusIndicator;
6962
- var ViewToggle = ({ viewMode, onViewModeChange }) => {
6880
+ var ViewToggle = ({
6881
+ viewMode,
6882
+ onViewModeChange
6883
+ }) => {
6963
6884
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg border p-1", children: [
6964
6885
  /* @__PURE__ */ jsxs(
6965
6886
  Button,
@@ -6993,7 +6914,7 @@ var ViewToggle = ({ viewMode, onViewModeChange }) => {
6993
6914
  variant: viewMode === "chat" ? "default" : "ghost",
6994
6915
  size: "sm",
6995
6916
  onClick: () => onViewModeChange("chat"),
6996
- className: "flex items-center gap-2",
6917
+ className: "flex items-center gap-2 hidden",
6997
6918
  children: [
6998
6919
  /* @__PURE__ */ jsx(MessageSquare, { className: "icon-size" }),
6999
6920
  "Conversa"