/* eslint-disable import/no-unresolved */
/* eslint-disable import/order */

import { sageService } from '@/service/sageService';
import { EntrepriseResponse } from '@/types/entreprise';
import { createAsyncThunk } from '@reduxjs/toolkit';


/**
 * search entreprise
 */
export const searchEntreprise = createAsyncThunk(
  'entreprise/searchEntreprise',
  async (query: string): Promise<EntrepriseResponse> => {
    try {
      return await sageService.searchEntreprise(query);
    } catch (err) {
      throw err;
    }
  }
);



