"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _preact = require("preact");

var _icon = require("./icon");

var _default = ({
  status,
  term
}) => {
  if (status === 'noResults') {
    return (0, _preact.h)("span", {
      className: "flex items-center mv1"
    }, (0, _preact.h)(_icon.Icon, {
      className: "f3 mr2",
      size: "18",
      icon: "warning"
    }), (0, _preact.h)("span", null, "No results for \"", term, "\""));
  }

  if (status === 'searching') {
    return (0, _preact.h)("span", {
      className: "flex items-center mv1"
    }, (0, _preact.h)(_icon.Icon, {
      className: "f3 spin-animation mr2",
      size: "18",
      icon: "autorenew"
    }), (0, _preact.h)("span", null, "Searching"));
  }

  if (status === 'ready') {
    return (0, _preact.h)("span", {
      className: "flex items-center mv1"
    }, (0, _preact.h)(_icon.Icon, {
      className: "f3 mr2",
      size: "18",
      icon: "info"
    }), (0, _preact.h)("span", null, "Suggestions will appear here"));
  }

  return null;
};

exports.default = _default;