'use client'; import { FC } from "react"; interface SecondLayerDropdownProps { isActive: boolean; isExpanded: boolean; innerText: string; onClick: () => void; } const SecondLayerDropdown: FC = ({ isActive, isExpanded, innerText, onClick }) => { // Base styles const baseClassName = "py-2 my-1 px-3 text-sm rounded-lg cursor-pointer transition-colors duration-200 flex justify-between items-center w-full"; // Determine the appropriate class based on active and expanded states let className = baseClassName; if (isActive) { className += " bg-emerald-600 text-white font-medium"; } else if (isExpanded) { className += " bg-emerald-500 text-white"; } else { className += " bg-emerald-700 text-white hover:bg-emerald-600"; } return (
{innerText} {isExpanded ? ( ) : ( )}
); }; export default SecondLayerDropdown;