'use strict';

var index = require('./index-Ct2DwlDF.js');

function SearchResult(props) {
    let results = props.results || props;
    let linkTarget = props.linkTarget || "_blank";
    return (index.h("div", { class: "results" }, index.h("ul", { role: "list", class: "cta-search-results" }, results === null || results === void 0 ? void 0 : results.map(result => {
        var _a, _b;
        return (index.h("li", { key: result.title, class: "cta-search-results-list" }, index.h("div", { class: "px-4 sm:px-6 lg:px-8" }, index.h("div", { class: "cta-search-container" }, index.h("div", { class: "cta-search-container-two" }, index.h("div", { class: "results-icon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5" }))), index.h("div", { class: "cta-search-container-three" }, index.h("p", { class: "cta-search-text" }, index.h("a", { href: (_a = result.link) !== null && _a !== void 0 ? _a : result.url, target: linkTarget }, index.h("span", { class: "cta-search-text-position" }), result.title)), index.h("p", { class: "cta-search-description" }, index.h("a", { href: (_b = result.link) !== null && _b !== void 0 ? _b : result.url, class: "relative truncate hover:underline", target: linkTarget }, result.description)))), index.h("div", { class: "cta-search-list-arrow" }, index.h("svg", { class: "h-5 w-5 flex-none text-gray-400", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, index.h("path", { "fill-rule": "evenodd", d: "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z", "clip-rule": "evenodd" })))))));
    }))));
}

exports.SearchResult = SearchResult;
