import { h } from './chunks/d4789960.js';
import './chunks/456564be.js';
import { u as useProp } from './chunks/c26036df.js';
import { u as useEvent } from './chunks/d4058887.js';
import './chunks/4ccc6eeb.js';
import { g as getComponentOrDefine } from './chunks/071ed725.js';
import './chunks/23e44913.js';
import { O as Option } from './chunks/a02c5734.js';
import './chunks/d76d6172.js';
import './kun-icon.js';
import './chunks/cd857e99.js';
import './kun-image-or-default.js';
import './chunks/e5702756.js';
import './kun-image.js';
import { g as getKunImageUrl } from './chunks/8c68f334.js';

var style = ":host {\n}\n";

const KunPostListHeader = () => {
  const [cardProps] = useProp("post");
  const [seriesProps] = useProp("series");
  const defaultCard = {
    title: "做一个好人"
  };
  const defaultSeries = {
    title: "做一个好人",
    coverImageName: "HKrq8LbEEeq11V94e6TtHg==.png"
  };
  const clickEvent = useEvent("MyClick", {
    composed: true,
    bubbles: true
  });
  const card = Option.of(cardProps).getOrElse(defaultCard);
  const series = Option.of(seriesProps).getOrElse(defaultSeries);
  return h("host", null, h("style", null, style), h("div", {
    class: "py-4 bg-gray-400 w-full px-8"
  }, h("div", {
    class: "flex flex-row"
  }, h("kun-image-or-default", {
    url: getKunImageUrl(series.coverImageName),
    width: 65,
    height: 65
  }), h("div", {
    className: "ml-2 text-white text-xl cursor-pointer",
    onclick: () => clickEvent({})
  }, card.title))));
};

KunPostListHeader.props = {
  series: {
    type: Object,
    reflect: true,
    event: {
      type: "changeMessage"
    }
  },
  post: {
    type: Object,
    reflect: true,
    event: {
      type: "changeMessage"
    }
  },
  message: {
    type: String,
    value: "kun-post-list-heade-dr",
    reflect: true,
    event: {
      type: "changeMessage"
    }
  }
};
var kunPostListHeader = getComponentOrDefine("kun-post-list-header", KunPostListHeader);

export default kunPostListHeader;
//# sourceMappingURL=kun-post-list-header.js.map
