import { useProp, useEvent, h } from 'atomico';
import { Option } from 'funfix';
import { g as getComponentOrDefine } from './chunks/65ef80fe.js';
import './kun-icon.js';
import './chunks/a234fa33.js';
import './kun-image-or-default.js';
import '@caedman/kit/dist/use-stylesheet';
import 'lazyload-image';
import './kun-image.js';
import 'dayjs';
import { getKunImageUrl } from './kun-chat-message.js';

const _jsxFileName = "/Users/rang/rang/frond_ng/packages/six/src/components/kun-series-list-item/kun-series-list-item.tsx";
const style = `
  :host {
    
  }
`;
const KunSeriesListItem = () => {
  const [cardProps] = useProp("kunItem");

  const defaultCard = {
    title: "做一个好人",
  } ;

  const clickEvent = useEvent("MyClick", {
    composed: true,
    bubbles: true,
  });

  const card = Option.of(cardProps).getOrElse(defaultCard);
  return (
    h('host', {__self: undefined, __source: {fileName: _jsxFileName, lineNumber: 31}}
      , h('style', {__self: undefined, __source: {fileName: _jsxFileName, lineNumber: 32}}, style)
      , h('div', { class: "py-4 bg-gray-400 w-full px-8"   , __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 33}}
        , h('div', { class: "flex flex-row" , __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 34}}
          , h('kun-image-or-default', { url: getKunImageUrl(card.coverImageName), width: 65, height: 65, __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 35}} )
          , h('div', { className: "ml-2 text-white text-xl cursor-pointer"   , onclick: () => clickEvent({}), __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 36}}
            , h('div', {__self: undefined, __source: {fileName: _jsxFileName, lineNumber: 37}}
              , card.title
            )
            , h('div', { class: "text-sm text-gray-700" , __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 40}}
              , card.subscriptionCount, "人参与"

            )
          )
        )
      )
    )
  );
};

KunSeriesListItem.props = {
  kunItem: {
    type: Object,
    reflect: true,
    event: {
      type: "changeMessage",
    },
  },
  message: {
    type: String,
    value: "kun-post-list-heade-dr",
    reflect: true,
    event: {
      type: "changeMessage",
    },
  },
};

var kunSeriesListItem = getComponentOrDefine("kun-series-list-item", KunSeriesListItem);

export default kunSeriesListItem;
