"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getTourDataById = void 0;
const getTourDataById = (tourId, advancedTourId, toursSettings) => {
  const emptyTour = {
    id: '',
    steps: [],
    onCompleteHandler: () => {},
    onSkipHandler: () => {}
  };
  const emptyAdvancedTour = {
    id: '',
    steps: [],
    onSkipHandler: () => {}
  };
  if (tourId === '' && advancedTourId === '') {
    return {
      tour: emptyTour,
      advancedTour: emptyAdvancedTour
    };
  }
  const {
    advancedTours,
    tours
  } = toursSettings;
  return {
    tour: tours.find(({
      id
    }) => id === tourId) ?? emptyTour,
    advancedTour: advancedTours.find(({
      id
    }) => id === advancedTourId) ?? emptyAdvancedTour
  };
};
exports.getTourDataById = getTourDataById;