import { defineComponent } from 'vue';
import styles from '../index2.module.less';
import { NImage } from 'naive-ui';
import teacherHeader from '@/components/layout/images/teacherIcon.png';
export default defineComponent({
  name: 'home-teachItem',
  props: ['item'],
  setup(props, { emit }) {
    return () => (
      <>
        <div class={styles.teachGroupItemWrap}>
          <div class={styles.teachGroupItemLeft}>
            <NImage
              previewDisabled
              src={props.item.image ? props.item.image : teacherHeader}
              class={styles.teachGroupItemHeader}
              object-fit="cover"></NImage>
          </div>
          <div class={styles.teachGroupItemRight}>
            <p class={styles.teachGroupItemName}>
              {props.item.teacherName} <span>{props.item.classGroup}</span>
            </p>

            <p class={styles.teachGroupItemInfo}>
              {props.item.subjectName && (
                <span class={styles.subjectName}>{props.item.subjectName}</span>
              )}
              {props.item.conent}
            </p>
          </div>
        </div>
      </>
    );
  }
});
