import ViewOnMapIcon from "../../../icons/ViewOnMapIcon";

type ViewOnMapProps = {
  onClick?: () => void;
  isVillaSelected?: boolean;
};

const ViewOnMapButton = ({ onClick, isVillaSelected }: ViewOnMapProps) => {
  return (
    <button
      className={`w-1/2 border-r flex justify-center gap-1 items-center hover:bg-secondary transition-all duration-200 ${
        isVillaSelected ? "bg-[#EAE5E0] rounded-es-2xl" : ""
      }`}
      onClick={onClick}
    >
      View on Map
      <ViewOnMapIcon />
    </button>
  );
};

export default ViewOnMapButton;
