"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import * as React from "react";
import { apiCall, withScopedApiRequestHeaders } from "@open-mercato/ui/backend/utils/apiCall";
import { buildOptimisticLockHeader } from "@open-mercato/ui/backend/utils/optimisticLock";
import { useGuardedMutation } from "@open-mercato/ui/backend/injection/useGuardedMutation";
import { surfaceRecordConflict } from "@open-mercato/ui/backend/conflicts";
import { flash } from "@open-mercato/ui/backend/FlashMessages";
import { Badge } from "@open-mercato/ui/primitives/badge";
import { Button } from "@open-mercato/ui/primitives/button";
import { Input } from "@open-mercato/ui/primitives/input";
import { Label } from "@open-mercato/ui/primitives/label";
import { Alert, AlertDescription } from "@open-mercato/ui/primitives/alert";
import {
  Select,
  SelectContent,
  SelectItem,
  SelectTrigger,
  SelectValue
} from "@open-mercato/ui/primitives/select";
import { Spinner } from "@open-mercato/ui/primitives/spinner";
import { Switch } from "@open-mercato/ui/primitives/switch";
import { useOrganizationScopeVersion } from "@open-mercato/shared/lib/frontend/useOrganizationScope";
import { useT } from "@open-mercato/shared/lib/i18n/context";
import { getSyncSummaryVariant } from "../lib/syncRunStatus.js";
import {
  CalendarClock,
  Play,
  RefreshCw,
  Save,
  ShieldAlert,
  ShieldCheck,
  Trash2
} from "lucide-react";
const DEFAULT_TIMEZONE = Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
function formatEntityTypeLabel(entityType) {
  return entityType.replace(/[_-]+/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
}
function buildDefaultScheduleState(entityType) {
  const normalized = entityType.trim().toLowerCase();
  const longerInterval = normalized === "categories" || normalized === "attributes";
  return {
    scheduleType: "interval",
    scheduleValue: longerInterval ? "6h" : "1h",
    timezone: DEFAULT_TIMEZONE,
    fullSync: normalized !== "products",
    isEnabled: true,
    lastRunAt: null,
    updatedAt: null
  };
}
function getSupportedDirections(direction) {
  if (direction === "export") return ["export"];
  if (direction === "bidirectional") return ["import", "export"];
  return ["import"];
}
function buildScheduleKey(entityType, direction) {
  return `${entityType}:${direction}`;
}
function buildScheduleEditors(entityTypes, directions, records) {
  const nextEntries = [];
  for (const entityType of entityTypes) {
    for (const direction of directions) {
      const record = records.find((item) => item.entityType === entityType && item.direction === direction);
      nextEntries.push([
        buildScheduleKey(entityType, direction),
        record ? {
          id: record.id,
          scheduleType: record.scheduleType,
          scheduleValue: record.scheduleValue,
          timezone: record.timezone,
          fullSync: record.fullSync,
          isEnabled: record.isEnabled,
          lastRunAt: record.lastRunAt,
          updatedAt: record.updatedAt ?? null
        } : buildDefaultScheduleState(entityType)
      ]);
    }
  }
  return Object.fromEntries(nextEntries);
}
function IntegrationScheduleTab(props) {
  const t = useT();
  const scopeVersion = useOrganizationScopeVersion();
  const { runMutation } = useGuardedMutation({
    contextId: "data_sync.integrationTab"
  });
  const [option, setOption] = React.useState(null);
  const [schedules, setSchedules] = React.useState({});
  const [isLoading, setIsLoading] = React.useState(true);
  const [runningKey, setRunningKey] = React.useState(null);
  const [savingKey, setSavingKey] = React.useState(null);
  const [deletingKey, setDeletingKey] = React.useState(null);
  const load = React.useCallback(async () => {
    setIsLoading(true);
    try {
      const [optionsCall, schedulesCall] = await Promise.all([
        apiCall("/api/data_sync/options", void 0, { fallback: { items: [] } }),
        apiCall(`/api/data_sync/schedules?integrationId=${encodeURIComponent(props.integrationId)}&page=1&pageSize=100`, void 0, { fallback: { items: [] } })
      ]);
      const resolvedOption = (optionsCall.result?.items ?? []).find((item) => item.integrationId === props.integrationId) ?? null;
      setOption(resolvedOption);
      const supportedEntities = resolvedOption?.supportedEntities ?? [];
      const supportedDirections2 = getSupportedDirections(resolvedOption?.direction);
      setSchedules(buildScheduleEditors(supportedEntities, supportedDirections2, schedulesCall.result?.items ?? []));
    } catch (error) {
      const message = error instanceof Error ? error.message : t("data_sync.integrationTab.loadError", "Failed to load sync schedules.");
      flash(message, "error");
    } finally {
      setIsLoading(false);
    }
  }, [props.integrationId, t]);
  React.useEffect(() => {
    void load();
  }, [load, scopeVersion]);
  const supportedDirections = React.useMemo(
    () => getSupportedDirections(option?.direction),
    [option?.direction]
  );
  const rows = React.useMemo(
    () => (option?.supportedEntities ?? []).flatMap((entityType) => supportedDirections.map((direction) => ({
      entityType,
      direction,
      key: buildScheduleKey(entityType, direction)
    }))),
    [option?.supportedEntities, supportedDirections]
  );
  const updateScheduleEditor = React.useCallback((key, patch, entityType) => {
    setSchedules((current) => ({
      ...current,
      [key]: {
        ...current[key] ?? buildDefaultScheduleState(entityType),
        ...patch
      }
    }));
  }, []);
  const handleStartSync = React.useCallback(async (entityType, direction, scheduleKey) => {
    if (!props.isEnabled) {
      flash(t("data_sync.integrationTab.integrationDisabled", "Enable the integration before starting a sync."), "error");
      return;
    }
    if (!props.hasCredentials) {
      flash(t("data_sync.integrationTab.credentialsMissing", "Configure credentials before starting a sync."), "error");
      return;
    }
    if (option?.canStartRun === false) {
      flash(t("data_sync.integrationTab.providerManaged", "Start this integration from its provider-specific setup flow."), "error");
      return;
    }
    setRunningKey(scheduleKey);
    try {
      const scheduleState = schedules[scheduleKey] ?? buildDefaultScheduleState(entityType);
      const call = await runMutation({
        // optimistic-lock-exempt: starts a new sync run (create), not a concurrent record edit
        operation: () => apiCall("/api/data_sync/run", {
          method: "POST",
          headers: { "content-type": "application/json" },
          body: JSON.stringify({
            integrationId: props.integrationId,
            entityType,
            direction,
            fullSync: scheduleState.fullSync,
            batchSize: 100
          })
        }, { fallback: null }),
        mutationPayload: {
          integrationId: props.integrationId,
          entityType,
          direction,
          fullSync: scheduleState.fullSync,
          batchSize: 100
        },
        context: {
          operation: "create",
          actionId: "start-sync-run",
          integrationId: props.integrationId
        }
      });
      if (!call.ok) {
        throw new Error(call.result?.error ?? "Failed to start sync");
      }
      flash(t("data_sync.integrationTab.runStarted", "Sync run started."), "success");
    } catch (error) {
      const message = error instanceof Error ? error.message : t("data_sync.integrationTab.runError", "Failed to start sync.");
      flash(message, "error");
    } finally {
      setRunningKey(null);
    }
  }, [option?.canStartRun, props.hasCredentials, props.integrationId, props.isEnabled, runMutation, schedules, t]);
  const handleSaveSchedule = React.useCallback(async (entityType, direction, scheduleKey) => {
    const scheduleState = schedules[scheduleKey] ?? buildDefaultScheduleState(entityType);
    setSavingKey(scheduleKey);
    try {
      const call = await runMutation({
        operation: () => withScopedApiRequestHeaders(
          buildOptimisticLockHeader(scheduleState.updatedAt),
          () => apiCall("/api/data_sync/schedules", {
            method: "POST",
            headers: { "content-type": "application/json" },
            body: JSON.stringify({
              integrationId: props.integrationId,
              entityType,
              direction,
              scheduleType: scheduleState.scheduleType,
              scheduleValue: scheduleState.scheduleValue,
              timezone: scheduleState.timezone,
              fullSync: scheduleState.fullSync,
              isEnabled: scheduleState.isEnabled
            })
          }, { fallback: null })
        ),
        mutationPayload: {
          integrationId: props.integrationId,
          entityType,
          direction,
          scheduleType: scheduleState.scheduleType,
          scheduleValue: scheduleState.scheduleValue,
          timezone: scheduleState.timezone,
          fullSync: scheduleState.fullSync,
          isEnabled: scheduleState.isEnabled
        },
        context: {
          operation: "update",
          actionId: "save-sync-schedule",
          integrationId: props.integrationId
        }
      });
      if (!call.ok || !call.result) {
        const conflictError = Object.assign(
          new Error(call.result?.error ?? "Failed to save schedule"),
          {
            status: call.status,
            ...call.result && typeof call.result === "object" ? call.result : {}
          }
        );
        if (surfaceRecordConflict(conflictError, t)) {
          return;
        }
        throw conflictError;
      }
      updateScheduleEditor(scheduleKey, {
        id: call.result.id,
        scheduleType: call.result.scheduleType,
        scheduleValue: call.result.scheduleValue,
        timezone: call.result.timezone,
        fullSync: call.result.fullSync,
        isEnabled: call.result.isEnabled,
        lastRunAt: call.result.lastRunAt,
        updatedAt: call.result.updatedAt ?? null
      }, entityType);
      flash(t("data_sync.dashboard.schedule.success", "Recurring schedule saved"), "success");
    } catch (error) {
      const message = error instanceof Error ? error.message : t("data_sync.dashboard.schedule.error", "Failed to save recurring schedule");
      flash(message, "error");
    } finally {
      setSavingKey(null);
    }
  }, [props.integrationId, runMutation, schedules, t, updateScheduleEditor]);
  const handleDeleteSchedule = React.useCallback(async (entityType, scheduleKey) => {
    const scheduleState = schedules[scheduleKey];
    if (!scheduleState?.id) {
      updateScheduleEditor(scheduleKey, buildDefaultScheduleState(entityType), entityType);
      return;
    }
    setDeletingKey(scheduleKey);
    try {
      const call = await runMutation({
        operation: () => withScopedApiRequestHeaders(
          buildOptimisticLockHeader(scheduleState.updatedAt),
          () => apiCall(`/api/data_sync/schedules/${encodeURIComponent(scheduleState.id)}`, {
            method: "DELETE"
          }, { fallback: null })
        ),
        mutationPayload: {
          scheduleId: scheduleState.id
        },
        context: {
          operation: "delete",
          actionId: "delete-sync-schedule"
        }
      });
      if (!call.ok) {
        throw new Error(call.result?.error ?? "Failed to delete schedule");
      }
      setSchedules((current) => ({
        ...current,
        [scheduleKey]: buildDefaultScheduleState(entityType)
      }));
      flash(t("data_sync.dashboard.schedule.deleteSuccess", "Recurring schedule removed"), "success");
    } catch (error) {
      const message = error instanceof Error ? error.message : t("data_sync.dashboard.schedule.deleteError", "Failed to remove recurring schedule");
      flash(message, "error");
    } finally {
      setDeletingKey(null);
    }
  }, [runMutation, schedules, t, updateScheduleEditor]);
  if (isLoading) {
    return /* @__PURE__ */ jsx("div", { className: "flex min-h-40 items-center justify-center rounded-lg border bg-card", children: /* @__PURE__ */ jsx(Spinner, {}) });
  }
  if (!option) {
    return /* @__PURE__ */ jsx(Alert, { variant: "warning", children: /* @__PURE__ */ jsx(AlertDescription, { children: t("data_sync.integrationTab.notAvailable", "This integration is not registered as a data sync provider.") }) });
  }
  return /* @__PURE__ */ jsxs("section", { className: "space-y-4 rounded-lg border bg-card p-6", children: [
    /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [
      /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
        /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
          /* @__PURE__ */ jsxs(Badge, { variant: getSyncSummaryVariant(props.isEnabled ? "enabled" : "disabled"), children: [
            props.isEnabled ? /* @__PURE__ */ jsx(ShieldCheck, { className: "mr-2 h-3.5 w-3.5" }) : /* @__PURE__ */ jsx(ShieldAlert, { className: "mr-2 h-3.5 w-3.5" }),
            props.isEnabled ? t("data_sync.dashboard.start.status.enabled", "Integration enabled") : t("data_sync.dashboard.start.status.disabled", "Integration disabled")
          ] }),
          /* @__PURE__ */ jsxs(Badge, { variant: getSyncSummaryVariant(props.hasCredentials ? "ready" : "missing"), children: [
            /* @__PURE__ */ jsx(CalendarClock, { className: "mr-2 h-3.5 w-3.5" }),
            props.hasCredentials ? t("data_sync.dashboard.start.status.credentialsReady", "Credentials ready") : t("data_sync.dashboard.start.status.credentialsMissing", "Credentials missing")
          ] })
        ] }),
        /* @__PURE__ */ jsxs("div", { children: [
          /* @__PURE__ */ jsx("h3", { className: "text-base font-semibold", children: t("data_sync.integrationTab.title", "Sync schedules") }),
          /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("data_sync.integrationTab.description", "Run one-off syncs or save recurring schedules for every supported entity directly from the integration detail page.") })
        ] })
      ] }),
      /* @__PURE__ */ jsxs(Button, { type: "button", variant: "outline", onClick: () => void load(), disabled: isLoading, children: [
        /* @__PURE__ */ jsx(RefreshCw, { className: "mr-2 h-4 w-4" }),
        t("data_sync.integrationTab.refresh", "Refresh")
      ] })
    ] }),
    !props.isEnabled ? /* @__PURE__ */ jsx(Alert, { variant: "warning", children: /* @__PURE__ */ jsx(AlertDescription, { children: t("data_sync.integrationTab.integrationDisabledNotice", "The integration is disabled. You can save schedules now, but runs will stay blocked until the integration is enabled.") }) }) : null,
    !props.hasCredentials ? /* @__PURE__ */ jsx(Alert, { variant: "warning", children: /* @__PURE__ */ jsx(AlertDescription, { children: t("data_sync.integrationTab.credentialsMissingNotice", "Credentials are still missing. Save schedules first if you want, but manual and scheduled runs will fail until credentials are configured.") }) }) : null,
    option.canStartRun === false ? /* @__PURE__ */ jsx(Alert, { variant: "info", children: /* @__PURE__ */ jsx(AlertDescription, { children: t("data_sync.integrationTab.providerManagedNotice", "This provider needs its own setup flow before a run can start. Use the provider tab on this page instead of generic schedules.") }) }) : null,
    rows.length === 0 ? /* @__PURE__ */ jsx(Alert, { variant: "info", children: /* @__PURE__ */ jsx(AlertDescription, { children: t("data_sync.integrationTab.empty", "This provider does not expose any schedulable sync entities yet.") }) }) : /* @__PURE__ */ jsx("div", { className: "overflow-x-auto rounded-lg border", children: /* @__PURE__ */ jsxs("table", { className: "w-full min-w-[1080px] text-sm", children: [
      /* @__PURE__ */ jsx("thead", { className: "bg-muted/50 text-left", children: /* @__PURE__ */ jsxs("tr", { children: [
        /* @__PURE__ */ jsx("th", { className: "px-3 py-2 font-medium", children: t("data_sync.dashboard.columns.entityType", "Entity Type") }),
        /* @__PURE__ */ jsx("th", { className: "px-3 py-2 font-medium", children: t("data_sync.dashboard.columns.direction", "Direction") }),
        /* @__PURE__ */ jsx("th", { className: "px-3 py-2 font-medium", children: t("data_sync.dashboard.schedule.type", "Schedule type") }),
        /* @__PURE__ */ jsx("th", { className: "px-3 py-2 font-medium", children: t("data_sync.integrationTab.columns.value", "Value") }),
        /* @__PURE__ */ jsx("th", { className: "px-3 py-2 font-medium", children: t("data_sync.dashboard.schedule.timezone", "Timezone") }),
        /* @__PURE__ */ jsx("th", { className: "px-3 py-2 font-medium", children: t("data_sync.dashboard.start.fullSync", "Run as full sync") }),
        /* @__PURE__ */ jsx("th", { className: "px-3 py-2 font-medium", children: t("data_sync.dashboard.schedule.enabled", "Schedule enabled") }),
        /* @__PURE__ */ jsx("th", { className: "px-3 py-2 font-medium", children: t("data_sync.integrationTab.columns.lastRun", "Last run") }),
        /* @__PURE__ */ jsx("th", { className: "px-3 py-2 font-medium", children: t("data_sync.integrationTab.columns.actions", "Actions") })
      ] }) }),
      /* @__PURE__ */ jsx("tbody", { children: rows.map((row) => {
        const scheduleState = schedules[row.key] ?? buildDefaultScheduleState(row.entityType);
        const isRunning = runningKey === row.key;
        const isSaving = savingKey === row.key;
        const isDeleting = deletingKey === row.key;
        const controlsDisabled = isRunning || isSaving || isDeleting;
        return /* @__PURE__ */ jsxs("tr", { className: "border-t align-top", children: [
          /* @__PURE__ */ jsx("td", { className: "px-3 py-3 font-medium", children: formatEntityTypeLabel(row.entityType) }),
          /* @__PURE__ */ jsx("td", { className: "px-3 py-3", children: t(`data_sync.dashboard.direction.${row.direction}`, row.direction === "import" ? "Import" : "Export") }),
          /* @__PURE__ */ jsx("td", { className: "px-3 py-3", children: /* @__PURE__ */ jsxs(
            Select,
            {
              value: scheduleState.scheduleType,
              onValueChange: (value) => updateScheduleEditor(row.key, {
                scheduleType: value === "cron" ? "cron" : "interval"
              }, row.entityType),
              disabled: controlsDisabled,
              children: [
                /* @__PURE__ */ jsx(SelectTrigger, { size: "lg", className: "min-w-32", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
                /* @__PURE__ */ jsxs(SelectContent, { children: [
                  /* @__PURE__ */ jsx(SelectItem, { value: "interval", children: t("data_sync.dashboard.schedule.interval", "Interval") }),
                  /* @__PURE__ */ jsx(SelectItem, { value: "cron", children: t("data_sync.dashboard.schedule.cron", "Cron") })
                ] })
              ]
            }
          ) }),
          /* @__PURE__ */ jsx("td", { className: "px-3 py-3", children: /* @__PURE__ */ jsx(
            Input,
            {
              value: scheduleState.scheduleValue,
              onChange: (event) => updateScheduleEditor(row.key, { scheduleValue: event.target.value }, row.entityType),
              disabled: controlsDisabled,
              placeholder: scheduleState.scheduleType === "cron" ? "0 * * * *" : "1h"
            }
          ) }),
          /* @__PURE__ */ jsx("td", { className: "px-3 py-3", children: /* @__PURE__ */ jsx(
            Input,
            {
              value: scheduleState.timezone,
              onChange: (event) => updateScheduleEditor(row.key, { timezone: event.target.value }, row.entityType),
              disabled: controlsDisabled
            }
          ) }),
          /* @__PURE__ */ jsx("td", { className: "px-3 py-3", children: /* @__PURE__ */ jsxs("label", { className: "flex min-h-10 items-center gap-2 text-sm", children: [
            /* @__PURE__ */ jsx(
              Switch,
              {
                checked: scheduleState.fullSync,
                onCheckedChange: (checked) => updateScheduleEditor(row.key, { fullSync: checked }, row.entityType),
                disabled: controlsDisabled,
                "aria-label": t("data_sync.dashboard.start.fullSync", "Run as full sync")
              }
            ),
            /* @__PURE__ */ jsx("span", { children: t("data_sync.integrationTab.fullSyncShort", "Full") })
          ] }) }),
          /* @__PURE__ */ jsx("td", { className: "px-3 py-3", children: /* @__PURE__ */ jsxs("label", { className: "flex min-h-10 items-center gap-2 text-sm", children: [
            /* @__PURE__ */ jsx(
              Switch,
              {
                checked: scheduleState.isEnabled,
                onCheckedChange: (checked) => updateScheduleEditor(row.key, { isEnabled: checked }, row.entityType),
                disabled: controlsDisabled,
                "aria-label": t("data_sync.dashboard.schedule.enabled", "Schedule enabled")
              }
            ),
            /* @__PURE__ */ jsx("span", { children: scheduleState.isEnabled ? t("data_sync.dashboard.schedule.status.shortEnabled", "Scheduled") : t("data_sync.dashboard.schedule.status.shortDisabled", "Paused") })
          ] }) }),
          /* @__PURE__ */ jsx("td", { className: "px-3 py-3 text-muted-foreground", children: scheduleState.lastRunAt ? new Date(scheduleState.lastRunAt).toLocaleString() : scheduleState.id ? t("data_sync.dashboard.schedule.neverRun", "Saved, but no scheduled execution has completed yet.") : t("data_sync.dashboard.schedule.none", "No recurring schedule saved for this target yet.") }),
          /* @__PURE__ */ jsx("td", { className: "px-3 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
            /* @__PURE__ */ jsxs(
              Button,
              {
                type: "button",
                size: "sm",
                onClick: () => void handleStartSync(row.entityType, row.direction, row.key),
                disabled: controlsDisabled || !props.isEnabled || !props.hasCredentials || option.canStartRun === false,
                children: [
                  isRunning ? /* @__PURE__ */ jsx(Spinner, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ jsx(Play, { className: "mr-2 h-4 w-4" }),
                  isRunning ? t("data_sync.integrationTab.starting", "Starting...") : t("data_sync.integrationTab.start", "Run now")
                ]
              }
            ),
            /* @__PURE__ */ jsxs(
              Button,
              {
                type: "button",
                size: "sm",
                variant: "outline",
                onClick: () => void handleSaveSchedule(row.entityType, row.direction, row.key),
                disabled: controlsDisabled || option.canStartRun === false,
                children: [
                  isSaving ? /* @__PURE__ */ jsx(Spinner, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ jsx(Save, { className: "mr-2 h-4 w-4" }),
                  isSaving ? t("data_sync.dashboard.schedule.saving", "Saving...") : t("data_sync.dashboard.schedule.save", "Save recurring schedule")
                ]
              }
            ),
            /* @__PURE__ */ jsxs(
              Button,
              {
                type: "button",
                size: "sm",
                variant: "outline",
                onClick: () => void handleDeleteSchedule(row.entityType, row.key),
                disabled: controlsDisabled || !scheduleState.id,
                children: [
                  isDeleting ? /* @__PURE__ */ jsx(Spinner, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" }),
                  isDeleting ? t("data_sync.dashboard.schedule.deleting", "Removing...") : t("data_sync.dashboard.schedule.delete", "Remove schedule")
                ]
              }
            )
          ] }) })
        ] }, row.key);
      }) })
    ] }) }),
    /* @__PURE__ */ jsxs("div", { className: "grid gap-3 rounded-lg border border-dashed p-4 text-sm text-muted-foreground md:grid-cols-3", children: [
      /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
        /* @__PURE__ */ jsx(Label, { children: t("data_sync.dashboard.schedule.interval", "Interval") }),
        /* @__PURE__ */ jsx("p", { children: t("data_sync.dashboard.schedule.intervalHelp", "Example: `1h`, `6h`, or `24h` for repeating intervals.") })
      ] }),
      /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
        /* @__PURE__ */ jsx(Label, { children: t("data_sync.dashboard.schedule.cron", "Cron") }),
        /* @__PURE__ */ jsx("p", { children: t("data_sync.dashboard.schedule.cronHelp", "Example: `0 * * * *` runs at the start of every hour.") })
      ] }),
      /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
        /* @__PURE__ */ jsx(Label, { children: t("data_sync.integrationTab.runNowTitle", "Manual runs") }),
        /* @__PURE__ */ jsx("p", { children: t("data_sync.integrationTab.runNowHelp", "Run now uses the full-sync checkbox from the same row and starts progress tracking immediately in Data Sync.") })
      ] })
    ] })
  ] });
}
var IntegrationScheduleTab_default = IntegrationScheduleTab;
export {
  IntegrationScheduleTab,
  IntegrationScheduleTab_default as default
};
//# sourceMappingURL=IntegrationScheduleTab.js.map
