import { h } from './chunks/d4789960.js';
import './chunks/456564be.js';
import { u as useProp } from './chunks/c26036df.js';
import { g as getComponentOrDefine } from './chunks/071ed725.js';

var style = ".title {\n  height: 70px;\n  line-height: 70px;\n  padding: 0 25px;\n  font-size: 18px;\n  color: #333;\n}\n\n.item {\n  border-top: 0.5px solid #F2F2F2;\n  line-height: 25px;\n  padding: 25px 24px;\n  box-sizing: border-box;\n  text-align: justify;\n  font-size: 14px;\n  color: #333;\n}\n";

function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
const KunArticle = ({
  message
}) => {
  const [list] = useProp("posts");

  const openLink = url => {
    window.open(url, "_blank");
  };

  return h("host", null, h("style", null, style), h("div", {
    class: "max-w-sm rounded overflow-hidden shadow-lg"
  }, h("div", {
    className: "title"
  }, _nullishCoalesce(message, () => ( "dd"))), list.map(item => h("div", {
    role: "presentation",
    key: item.title,
    className: "item transition cursor-pointer duration-500 ease-in-out hover:bg-gray-200 transform",
    onclick: () => openLink(item.url)
  }, item.title))));
};

KunArticle.props = {
  posts: {
    type: Array,
    value: [{
      title: "a",
      url: "http"
    }]
  },
  message: {
    type: String,
    value: "kun-article-list",
    reflect: true,
    event: {
      type: "changeMessage"
    }
  }
};
var kunArticleList = getComponentOrDefine("kun-article-list", KunArticle);

export default kunArticleList;
//# sourceMappingURL=kun-article-list.js.map
