import List from "./List";
import Loading from "./Loading";

function Hours({ appo, doctor, hour, setHour, value, nameHours }) {
  if (appo === "loading") {
    return <Loading />;
  } else if (typeof appo === "string") {
    return (
      <p className="text-[#525252] text-[14px] md:text-[16px] font-medium py-[56px]">
        {appo}
      </p>
    );
  } else {
    return <List appo={appo} hour={hour} value={value} setHour={setHour} />;
  }
}

export default Hours;
