// /redux/thunks/getAllTDRReferenceChartThunk.ts

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

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