import {bold, dim, green, magenta, yellow} from "kleur/colors";
import {pad} from "./util.js";
function req({url, statusCode, reqTime}) {
  let color = dim;
  if (statusCode >= 500)
    color = magenta;
  else if (statusCode >= 400)
    color = yellow;
  else if (statusCode >= 300)
    color = dim;
  else if (statusCode >= 200)
    color = green;
  return `${color(statusCode)} ${pad(url, 40)} ${dim(Math.round(reqTime) + "ms")}`;
}
function reload({url, reqTime}) {
  let color = yellow;
  return `${pad(url, 40)} ${dim(Math.round(reqTime) + "ms")}`;
}
function devStart({startupTime}) {
  return `${pad(`Server started`, 44)} ${dim(`${Math.round(startupTime)}ms`)}`;
}
function devHost({host}) {
  return `Local: ${bold(magenta(host))}`;
}
function portInUse({port}) {
  return `Port ${port} in use. Trying a new one\u2026`;
}
export {
  devHost,
  devStart,
  portInUse,
  reload,
  req
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vc3JjL2NvcmUvZGV2L21lc3NhZ2VzLnRzIl0sCiAgIm1hcHBpbmdzIjogIkFBSUE7QUFDQTtBQUdPLGFBQWEsQ0FBRSxLQUFLLFlBQVksVUFBeUU7QUFDOUcsTUFBSSxRQUFRO0FBQ1osTUFBSSxjQUFjO0FBQUssWUFBUTtBQUFBLFdBQ3RCLGNBQWM7QUFBSyxZQUFRO0FBQUEsV0FDM0IsY0FBYztBQUFLLFlBQVE7QUFBQSxXQUMzQixjQUFjO0FBQUssWUFBUTtBQUNwQyxTQUFPLEdBQUcsTUFBTSxlQUFlLElBQUksS0FBSyxPQUFPLElBQUksS0FBSyxNQUFNLFdBQVc7QUFBQTtBQUlwRSxnQkFBZ0IsQ0FBRSxLQUFLLFVBQXFEO0FBQ2pGLE1BQUksUUFBUTtBQUNaLFNBQU8sR0FBRyxJQUFJLEtBQUssT0FBTyxJQUFJLEtBQUssTUFBTSxXQUFXO0FBQUE7QUFJL0Msa0JBQWtCLENBQUUsY0FBZ0Q7QUFDekUsU0FBTyxHQUFHLElBQUksa0JBQWtCLE9BQU8sSUFBSSxHQUFHLEtBQUssTUFBTTtBQUFBO0FBSXBELGlCQUFpQixDQUFFLE9BQWtDO0FBQzFELFNBQU8sVUFBVSxLQUFLLFFBQVE7QUFBQTtBQUl6QixtQkFBbUIsQ0FBRSxPQUFrQztBQUM1RCxTQUFPLFFBQVE7QUFBQTsiLAogICJuYW1lcyI6IFtdCn0K
