// storeSwitchToDashboard.service.ts
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
import baseQueryWithReauth from "./baseQuery";

export type ContactUsFormData = {
  t_id: string;
  name: string;
  email: string;
  country: string;
  phone_number: string;
  service: string;
  budget: string;
  message: string;
  development_stage: string;
  startTime: string;
  nda_signing: string | boolean;
  from_page: string;
  ip?: string;
  user_agent?: string;
  contact_us_attachment?: File;
};

export const storeSwitchToDashboard = createApi({
  reducerPath: "storeSwitchToDashboard",
  baseQuery: baseQueryWithReauth,
  endpoints: (builder) => ({
    storeSwitchToDashboard: builder.mutation<void, FormData>({
      query: (formData) => ({
        url: "/api/store-contact-us-data",
        method: "POST",
        body: formData,
      }),
    }),
  }),
});

export const { useStoreSwitchToDashboardMutation } = storeSwitchToDashboard;