import { useState } from 'react' ; export const useListActionsBlockEffects = ( selectedTab ? , setSelectedTab ? , resetSelected ? ) => { const [ tabIndex , setTabIndex ] = useState ( 0 ) ; const selected = ! isNaN ( selectedTab ) ? selectedTab : tabIndex ; const setSelected = setSelectedTab ? setSelectedTab : setTabIndex ; const resetList = ( ) => { resetSelected ( ) ; setSelected ( 0 ) ; } ; return { selected , setSelected , resetList } ; } ;