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

export const useTripUI = () => {
  const hoveredPlaceId = useTripStore(state => state.hoveredPlaceId);
  const selectedPlaceId = useTripStore(state => state.selectedPlaceId);
  const activeTab = useTripStore(state => state.activeTab);
  const isAddPlaceOpen = useTripStore(state => state.isAddPlaceOpen);
  const highlightedPlaceId = useTripStore(state => state.highlightedPlaceId);
  const newlyAddedPlaceId = useTripStore(state => state.newlyAddedPlaceId);
  const setHoveredPlaceId = useTripStore(state => state.setHoveredPlaceId);
  const setSelectedPlaceId = useTripStore(state => state.setSelectedPlaceId);
  const setActiveTab = useTripStore(state => state.setActiveTab);
  const setIsAddPlaceOpen = useTripStore(state => state.setIsAddPlaceOpen);
  const setHighlightedPlaceId = useTripStore(state => state.setHighlightedPlaceId);
  const setNewlyAddedPlaceId = useTripStore(state => state.setNewlyAddedPlaceId);

  return {
    hoveredPlaceId,
    selectedPlaceId,
    activeTab,
    isAddPlaceOpen,
    highlightedPlaceId,
    newlyAddedPlaceId,
    setHoveredPlaceId,
    setSelectedPlaceId,
    setActiveTab,
    setIsAddPlaceOpen,
    setHighlightedPlaceId,
    setNewlyAddedPlaceId,
  };
};
