import { ActivityPlaceEntity } from "../../domain/entities/activity_place_entity";
import { ActivityPlaceModel } from "../models/activity_place_model";

export const activityPlaceModelToEntity = (
  activity: ActivityPlaceModel
): ActivityPlaceEntity => {
  return {
    idPlaceActivity: activity.idPoint,
    name: activity.name,
    number: activity.idPlace,
    idPlace: activity.idPlace,
    imageUrl: activity.imageName,
    directions: activity.directions
      ? {
          content: activity.directions,
          speakUrl: "",
        }
      : undefined,
    content: {
      content: activity.content,
      speakUrl: "",
    },
  };
};
