@embedreach/components 0.1.97 → 0.1.98

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.
@@ -12870,7 +12870,8 @@ const toastVariants = cva(
12870
12870
  {
12871
12871
  variants: {
12872
12872
  variant: {
12873
- default: "border bg-background text-foreground",
12873
+ default: "border bg-muted text-muted-foreground",
12874
+ success: "border bg-green-100 text-foreground",
12874
12875
  destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
12875
12876
  }
12876
12877
  },
@@ -64449,14 +64450,14 @@ function SegmentBuilder({
64449
64450
  {
64450
64451
  onSuccess: () => {
64451
64452
  toast2({
64452
- title: "Segment updated successfully"
64453
+ title: `${t("engage:segment")} updated successfully`
64453
64454
  });
64454
64455
  setOpen(false);
64455
- onSegmentUpdated?.(segment2.id);
64456
+ onSegmentUpdated?.(segmentId);
64456
64457
  },
64457
64458
  onError: () => {
64458
64459
  toast2({
64459
- title: "Error updating segment",
64460
+ title: `Error updating ${t("engage:segment")}`,
64460
64461
  description: "Please try again",
64461
64462
  variant: "destructive"
64462
64463
  });
@@ -64472,16 +64473,16 @@ function SegmentBuilder({
64472
64473
  conditions: segment2.conditions
64473
64474
  },
64474
64475
  {
64475
- onSuccess: () => {
64476
+ onSuccess: (data) => {
64476
64477
  toast2({
64477
- title: "Segment created successfully"
64478
+ title: `${t("engage:segment")} created successfully`
64478
64479
  });
64480
+ onSegmentUpdated?.(data?.id ?? false);
64479
64481
  setOpen(false);
64480
- onSegmentUpdated?.(segment2.id);
64481
64482
  },
64482
64483
  onError: () => {
64483
64484
  toast2({
64484
- title: "Error creating segment",
64485
+ title: `Error creating ${t("engage:segment")}`,
64485
64486
  description: "Please try again",
64486
64487
  variant: "destructive"
64487
64488
  });
@@ -64492,7 +64493,7 @@ function SegmentBuilder({
64492
64493
  }
64493
64494
  } catch (error22) {
64494
64495
  toast2({
64495
- title: "Error saving segment",
64496
+ title: `Error saving ${t("engage:segment")}`,
64496
64497
  description: "Please try again",
64497
64498
  variant: "destructive"
64498
64499
  });