import { useTripStore } from '@/store/useTripStore';

export const useTripData = () => {
  const trip = useTripStore(state => state.trip);
  const loading = useTripStore(state => state.loading);
  const error = useTripStore(state => state.error);
  const loadTrip = useTripStore(state => state.loadTrip);
  const updateTrip = useTripStore(state => state.updateTrip);
  const deleteTrip = useTripStore(state => state.deleteTrip);
  const addPlaceToDay = useTripStore(state => state.addPlaceToDay);
  const removePlaceFromDay = useTripStore(state => state.removePlaceFromDay);

  return {
    trip,
    loading,
    error,
    loadTrip,
    updateTrip,
    deleteTrip,
    addPlaceToDay,
    removePlaceFromDay,
  };
};
