import { IGetDealerResponse_DTO } from "@shared/contexts";
import { Dealer } from "../../../../../../domain";
import { ISalesContext } from "../../../../../Sales.context";

export interface IGetDealerByUserPresenter {
  map: (dealer: Dealer, context: ISalesContext) => IGetDealerResponse_DTO;
}

export const GetDealerByUserPresenter: IGetDealerByUserPresenter = {
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
  map: (dealer: Dealer, context: ISalesContext): IGetDealerResponse_DTO => {
    return {
      id: dealer.id.toString(),
      name: dealer.name.toString(),
      lang_code: dealer.language.code,
    };
  },
};
