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';
import './kun-button-puer.js';

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

const _jsxFileName = "/Users/rang/rang/frond_ng/packages/six/src/components/kun-see-series-item/kun-see-series-item.tsx";
const KunSeeSeriesItem = () => {
  const [kunSeriesProp] = useProp("kunSeries");

  const MyClick = useEvent("MyClick", {
    bubbles: true,
    composed: true,
  });
  const series = Option.of(kunSeriesProp).getOrElse({
    title: "有限次",
    subscriptionCount: 100,
    cardCount: 1000,
  } );

  const onclickTo = () => {
    MyClick({});
  };

  return (
    h('host', {__self: undefined, __source: {fileName: _jsxFileName, lineNumber: 31}}
      , h('style', {__self: undefined, __source: {fileName: _jsxFileName, lineNumber: 32}}, style)
      , h('div', { class: "border-solid rounded flex flex-row"   , __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 33}}
        , h('div', { class: "flex-none", __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 34}}
          , h('kun-image-or-default', { url: getKunImageUrl(series.coverImageName), width: 56, height: 56, __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 35}} )
        )
        , h('div', { class: "w-full flex flex-row justify-between px-4"    , __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 37}}
          , h('div', { class: "flex flex-col "  , __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 38}}
            , h('div', { class: "text-xl cursor-pointer text-xl"  , onclick: () => onclickTo(), __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 39}}, series.title)

            , h('div', { className: "flex inline-flex mt-2"  , __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 41}}
              , h('span', {__self: undefined, __source: {fileName: _jsxFileName, lineNumber: 42}}, "卡片"

                , series.cardCount
              )
              , h('span', {__self: undefined, __source: {fileName: _jsxFileName, lineNumber: 46}}, "人数"

                , series.subscriptionCount
              )
            )
          )

          , h('div', { class: "w-34", __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 53}}
            , h('kun-button-puer', { needleContent: "查看", __self: undefined, __source: {fileName: _jsxFileName, lineNumber: 54}} )
          )
        )
      )
    )
  );
};

KunSeeSeriesItem.props = {
  kunSeries: {
    type: Object,
  },
};

var kunSeeSeriesItem = getComponentOrDefine("kun-see-series-item", KunSeeSeriesItem);

export default kunSeeSeriesItem;
