// /redux/thunks/fetchAllTDRReferenceChartThunk.ts

import { createAsyncThunk } from "@reduxjs/toolkit";
import { fetchAllTDRReferenceChartData } from "../../services/fetchAllTDRReferenceChartDataService";

export const fetchAllTDRReferenceChartThunk = createAsyncThunk(
  "tdrReferenceChart/fetchAll",
  async (_, { rejectWithValue }) => {
    try {
      const data = await fetchAllTDRReferenceChartData();
      return data;
    } catch (error) {
      return rejectWithValue("Referenzdaten konnten nicht geladen werden");
    }
  }
);
