import { useTripStore, useActiveDay, useActiveDayTimelineBlocks } from '@/store/useTripStore';

export const useTripTimeline = () => {
  const activeDayId = useTripStore(state => state.activeDayId);
  const activeDay = useActiveDay();
  const activeDayTimelineBlocks = useActiveDayTimelineBlocks();
  const setActiveDayId = useTripStore(state => state.setActiveDayId);
  const reorderPlaces = useTripStore(state => state.reorderPlaces);

  return {
    activeDayId,
    activeDay,
    activeDayPlaces: activeDay?.places || [],
    activeDayTimelineBlocks,
    setActiveDayId,
    reorderPlaces,
  };
};
