import { 
  SortByKeys,
  SortOptionsBoxProps
} from '../model/types';
export const SortOptionsBox = ({
  sortBy,
  onClickToSort
}: SortOptionsBoxProps) => {
   
  return (
    <>
      <div className="sort-options">
        <button 
          className={ `sort-btn ${(sortBy === SortByKeys.New)? 'active': ''}` }
          onClick={ () => onClickToSort(SortByKeys.New) }
        >최신순</button>
        <span className="sort-divider">|</span>
        <button 
          className={ `sort-btn ${(sortBy === SortByKeys.Amount)? 'active': ''}` }
          onClick={ () => onClickToSort(SortByKeys.Amount) }
        >고액순</button>
      </div>
    </>
  );
};