var q = Object.defineProperty,
  M = Object.defineProperties
var H = Object.getOwnPropertyDescriptors
var f = Object.getOwnPropertySymbols
var j = Object.prototype.hasOwnProperty,
  E = Object.prototype.propertyIsEnumerable
var W = (e, o, l) =>
    o in e
      ? q(e, o, { enumerable: !0, configurable: !0, writable: !0, value: l })
      : (e[o] = l),
  S = (e, o) => {
    for (var l in o || (o = {})) j.call(o, l) && W(e, l, o[l])
    if (f) for (var l of f(o)) E.call(o, l) && W(e, l, o[l])
    return e
  },
  V = (e, o) => M(e, H(o))
var y = (e, o) => {
  var l = {}
  for (var a in e) j.call(e, a) && o.indexOf(a) < 0 && (l[a] = e[a])
  if (e != null && f)
    for (var a of f(e)) o.indexOf(a) < 0 && E.call(e, a) && (l[a] = e[a])
  return l
}
import {
  h as P,
  d as v,
  a as s,
  aa as D,
  G as u,
  j as r,
  z as w,
  A as C,
  S as h,
  B as d,
  D as Q,
  F as c,
  K as F,
  T as I,
  x as Z,
  W as O,
  X as L
} from './vendor.3506a68e.js'
/* empty css               */ /* empty css               */ import {
  C as g,
  a as n
} from './index.8b9f8b97.js'
import { C as R } from './index.57c6dc0b.js'
import { C as T } from './index.dc64d189.js'
import { r as A, s as J, p as X } from './index.9e4b607f.js'
import { v as _ } from './toolsValidate.add49407.js'
/* empty css               */ /* empty css              */ /* empty css               */ import { S as $ } from './index.706a8a15.js'
import { C as ee } from './index.f5235cf4.js'
import { U as se } from './index.fdb44d83.js'
import { S as G } from './index.2778830d.js'
import { C as te } from './index.84afa5a4.js'
import './index.339fc024.js'
/* empty css               */ /* empty css              */ /* empty css                */ /* empty css                */ /* empty css                */ /* empty css               */ import './checkbox_default.25179a07.js'
/* empty css               */ import './icon_teacher.cb128c00.js'
import './icon_timer2.5fb1750d.js'
import './icon-jiaozi.20e415ca.js'
import './bars.4f1962a6.js'
const oe = '_gridName_k7pw7_1',
  le = '_active_k7pw7_8'
var b = { 'video-create': '_video-create_k7pw7_1', gridName: oe, active: le }
const re = '_classInfo_umod2_1',
  ae = '_infoField_umod2_1',
  ue = '_boxStyle_umod2_14',
  ne = '_imgContainer_umod2_34',
  ie = '_btnGroup_umod2_48',
  de = '_photoTip_umod2_61'
var p = {
  classInfo: re,
  infoField: ae,
  boxStyle: ue,
  imgContainer: ne,
  btnGroup: ie,
  'class-info-tip': '_class-info-tip_umod2_52',
  photoTip: de
}
const t = P({
  groupId: 0,
  active: 1,
  tabIndex: 1,
  loadingStatus: !1,
  rate: 0,
  subjectList: [],
  templateList: [
    'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853010619green.png',
    'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853051064gray.png',
    'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853062314yellow.png',
    'https://ks3-cn-beijing.ksyuncs.com/video-course/1657853076136linear.png'
  ],
  lessonGroup: {
    id: null,
    lessonName: '',
    lessonSubject: null,
    lessonDesc: '',
    lessonPrice: null,
    lessonCoverUrl: '',
    lessonCoverTemplateUrl: ''
  },
  lessonList: [
    {
      videoTitle: '',
      videoContent: '',
      videoUrl: '',
      coverUrl: '',
      posterUrl: ''
    }
  ]
})
var ce = v({
  name: 'ClassInfo',
  data() {
    return { subjectStatus: !1 }
  },
  computed: {
    choiceSubjectIds() {
      const e = t.lessonGroup.lessonSubject
        ? Number(t.lessonGroup.lessonSubject)
        : null
      return console.log(e), e ? [e] : []
    },
    subjectList() {
      return t.subjectList || []
    },
    lessonSubjectName() {
      let e = ''
      return (
        this.subjectList.forEach(o => {
          this.choiceSubjectIds.includes(o.id) && (e = o.name)
        }),
        e
      )
    },
    calcRatePrice() {
      let e = t.rate || 0,
        o = t.lessonGroup.lessonPrice || 0
      return (o - (e / 100) * o).toFixed(2)
    }
  },
  async mounted() {
    try {
      if (t.subjectList.length <= 0) {
        const e = await A.post('/api-teacher/teacher/querySubject')
        t.subjectList = e.data || []
      }
    } catch {}
  },
  methods: {
    onChoice(e) {
      ;(t.lessonGroup.lessonSubject = e), (this.subjectStatus = !1)
    },
    onFormatter(e) {
      return _(e)
    },
    tabChange(e) {
      this.$refs.form.resetValidation('lessonCoverTemplateUrl'),
        this.$refs.form.resetValidation('lessonCoverUrl'),
        (t.tabIndex = e)
    },
    selectImg(e) {
      ;(t.lessonGroup.lessonCoverUrl = ''),
        (t.lessonGroup.lessonCoverTemplateUrl = e)
    }
  },
  render() {
    return t.loadingStatus
      ? s('div', null, null)
      : s(
          D,
          {
            class: p.classInfo,
            ref: 'form',
            onSubmit: () => (t.active = 2),
            onFailed: e => console.log(e),
            scrollToError: !0
          },
          {
            default: () => [
              s(g, null, {
                default: () => [
                  s(
                    n,
                    { title: '\u8BFE\u7A0B\u540D\u79F0', required: !0 },
                    {
                      default: () => [
                        s(
                          u,
                          {
                            modelValue: t.lessonGroup.lessonName,
                            'onUpdate:modelValue': e =>
                              (t.lessonGroup.lessonName = e),
                            name: 'lessonName',
                            maxlength: 50,
                            placeholder:
                              '\u8BF7\u8F93\u5165\u60A8\u7684\u8BFE\u7A0B\u540D\u79F0',
                            rules: [
                              {
                                required: !0,
                                message:
                                  '\u8BF7\u8F93\u5165\u60A8\u7684\u8BFE\u7A0B\u540D\u79F0'
                              }
                            ]
                          },
                          null
                        )
                      ]
                    }
                  ),
                  s(
                    n,
                    { title: '\u8BFE\u7A0B\u58F0\u90E8', required: !0 },
                    {
                      default: () => [
                        s(
                          u,
                          {
                            modelValue: this.lessonSubjectName,
                            name: 'lessonSubjectName',
                            readonly: !0,
                            isLink: !0,
                            onClick: () => {
                              this.subjectStatus = !0
                            },
                            rules: [
                              {
                                required: !0,
                                message:
                                  '\u8BF7\u9009\u62E9\u8BFE\u7A0B\u58F0\u90E8'
                              }
                            ],
                            placeholder:
                              '\u8BF7\u9009\u62E9\u8BFE\u7A0B\u58F0\u90E8'
                          },
                          null
                        )
                      ]
                    }
                  )
                ]
              }),
              s(g, null, {
                default: () => [
                  s(
                    n,
                    {
                      title: '\u8BFE\u7A0B\u4ECB\u7ECD',
                      required: !0,
                      border: !1
                    },
                    {
                      default: () => [
                        s(
                          u,
                          {
                            modelValue: t.lessonGroup.lessonDesc,
                            'onUpdate:modelValue': e =>
                              (t.lessonGroup.lessonDesc = e),
                            name: 'lessonDesc',
                            placeholder:
                              '\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD',
                            rows: '3',
                            maxlength: 200,
                            showWordLimit: !0,
                            autosize: !0,
                            rules: [
                              {
                                required: !0,
                                message:
                                  '\u8BF7\u8F93\u5165\u8BFE\u7A0B\u4ECB\u7ECD'
                              }
                            ],
                            type: 'textarea'
                          },
                          null
                        )
                      ]
                    }
                  )
                ]
              }),
              s(g, null, {
                default: () => [
                  s(
                    n,
                    { title: '\u8BFE\u7A0B\u7EC4\u552E\u4EF7', required: !0 },
                    {
                      default: () => [
                        s(
                          u,
                          {
                            modelValue: t.lessonGroup.lessonPrice,
                            'onUpdate:modelValue': e =>
                              (t.lessonGroup.lessonPrice = e),
                            name: 'lessonPrice',
                            placeholder:
                              '\u8BF7\u8F93\u5165\u60A8\u7684\u8BFE\u7A0B\u7EC4\u552E\u4EF7',
                            formatter: this.onFormatter,
                            type: 'number',
                            maxlength: 8,
                            rules: [
                              {
                                required: !0,
                                message:
                                  '\u8BF7\u8F93\u5165\u60A8\u7684\u8BFE\u7A0B\u7EC4\u552E\u4EF7'
                              }
                            ]
                          },
                          { button: () => s('span', null, [r('\u5143')]) }
                        )
                      ]
                    }
                  )
                ]
              }),
              s('div', { class: p['class-info-tip'] }, [
                s('p', null, [
                  r(
                    '\u6263\u9664\u624B\u7EED\u8D39\u540E\u60A8\u7684\u8BFE\u7A0B\u9884\u8BA1\u6536\u5165\u4E3A\uFF1A'
                  )
                ]),
                s('p', null, [
                  r('\u8BFE\u7A0B\u7EC4\u603B\u6536\u5165'),
                  s('span', null, [this.calcRatePrice]),
                  r('\u5143/\u4EBA')
                ]),
                s('p', null, [
                  r(
                    '\u60A8\u7684\u8BFE\u7A0B\u6536\u5165\u5C06\u5728\u8BFE\u7A0B\u7ED3\u675F\u540E\u7ED3\u7B97\u5230\u60A8\u7684\u8D26\u6237\u4E2D'
                  )
                ])
              ]),
              s(g, null, {
                default: () => [
                  s(
                    n,
                    { required: !0, border: !1 },
                    {
                      default: () => [
                        s('p', { class: p.photoTip }, [
                          r(
                            '\u6A21\u677F\u56FE\u7247\u5C06\u4F5C\u4E3A\u8BE5\u8BFE\u7A0B\u5C01\u9762\u4E3A\u5B66\u5458\u5C55\u793A'
                          )
                        ]),
                        s(
                          u,
                          {
                            name: 'lessonCoverUrl',
                            rules: [
                              {
                                required: !0,
                                message:
                                  '\u8BF7\u4E0A\u4F20\u81EA\u5B9A\u4E49\u6A21\u677F'
                              }
                            ]
                          },
                          {
                            input: () =>
                              s(
                                w,
                                {
                                  justify: 'space-between',
                                  style: { width: '100%' }
                                },
                                {
                                  default: () => [
                                    s(
                                      C,
                                      { span: 12, class: p.imgContainer },
                                      {
                                        default: () => [
                                          s(
                                            T,
                                            {
                                              cropper: !0,
                                              bucket: 'video-course',
                                              options: {
                                                fixedNumber: [1.77, 1],
                                                autoCropWidth: 750,
                                                autoCropHeight: 424
                                              },
                                              onUploadChange: e => {
                                                e &&
                                                  (t.lessonGroup.lessonCoverTemplateUrl =
                                                    '')
                                              },
                                              modelValue:
                                                t.lessonGroup.lessonCoverUrl,
                                              'onUpdate:modelValue': e =>
                                                (t.lessonGroup.lessonCoverUrl =
                                                  e),
                                              class: p.imgContainer
                                            },
                                            null
                                          )
                                        ]
                                      }
                                    ),
                                    s(
                                      C,
                                      { span: 24 },
                                      {
                                        default: () => [
                                          s(
                                            'p',
                                            {
                                              class: p.photoTip,
                                              style: {
                                                color: '#ff4e19',
                                                padding: '0'
                                              }
                                            },
                                            [
                                              r(
                                                '\u56FE\u7247\u5C3A\u5BF8\u4E3A750*424\u80FD\u8FBE\u5230\u6700\u4F73\u663E\u793A\u6548\u679C'
                                              )
                                            ]
                                          )
                                        ]
                                      }
                                    )
                                  ]
                                }
                              )
                          }
                        )
                      ],
                      title: () =>
                        s('p', null, [
                          r('\u8BF7\u4E0A\u4F20\u81EA\u5B9A\u4E49\u6A21\u677F')
                        ])
                    }
                  )
                ]
              }),
              s(
                h,
                { offsetBottom: 0, position: 'bottom' },
                {
                  default: () => [
                    s('div', { class: ['btnGroup'] }, [
                      s(
                        d,
                        {
                          block: !0,
                          round: !0,
                          type: 'primary',
                          'native-type': 'submit'
                        },
                        { default: () => [r('\u4E0B\u4E00\u6B65')] }
                      )
                    ])
                  ]
                }
              ),
              s(
                R,
                {
                  modelValue: this.subjectStatus,
                  'onUpdate:modelValue': e => (this.subjectStatus = e),
                  destroy: !0
                },
                {
                  default: () => [
                    s(
                      $,
                      {
                        selectType: 'Radio',
                        single: !0,
                        subjectList: t.subjectList,
                        choiceSubjectIds: this.choiceSubjectIds,
                        onChoice: this.onChoice
                      },
                      null
                    )
                  ]
                }
              )
            ]
          }
        )
  }
})
const pe = '_upload_1nja4_1',
  me = '_disabled_1nja4_7',
  ge = '_titleSection_1nja4_10',
  Ae = '_title_1nja4_10'
var i = {
    'class-content': '_class-content_1nja4_1',
    upload: pe,
    disabled: me,
    titleSection: ge,
    title: Ae,
    'add-item': '_add-item_1nja4_32'
  },
  be = v({
    name: 'ClassContent',
    data() {
      return { url: '', checked: null }
    },
    methods: {
      onSubmit(e) {
        t.active = 3
      },
      addItem() {
        t.lessonList.push({
          videoTitle: '',
          videoContent: '',
          videoUrl: '',
          coverUrl: '',
          posterUrl: ''
        })
      },
      removeItem(e) {
        t.lessonList.length <= 1 ||
          Q.confirm({
            title: '\u64CD\u4F5C',
            message:
              '\u786E\u5B9A\u5220\u9664\u8BE5\u6761\u6570\u636E\u5417\uFF1F',
            confirmButtonColor: '#01C1B5'
          }).then(() => {
            t.lessonList.splice(e, 1)
          })
      }
    },
    render() {
      return s(
        D,
        {
          class: i['class-content'],
          onSubmit: this.onSubmit,
          scrollToError: !0
        },
        {
          default: () => [
            t.lessonList.map((e, o) =>
              s(c, null, [
                s('div', { class: i.titleSection }, [
                  s('span', { class: i.title }, [
                    r('\u7B2C'),
                    o + 1,
                    r('\u8BFE')
                  ]),
                  s(
                    F,
                    {
                      name: 'delete-o',
                      style: { fontWeight: 600 },
                      class: t.lessonList.length <= 1 ? i.disabled : null,
                      onClick: () => this.removeItem(o),
                      size: 20
                    },
                    null
                  )
                ]),
                s(g, null, {
                  default: () => [
                    s(
                      n,
                      { title: '\u8BFE\u7A0B\u6807\u9898', required: !0 },
                      {
                        default: () => [
                          s(
                            u,
                            {
                              modelValue: e.videoTitle,
                              'onUpdate:modelValue': l => (e.videoTitle = l),
                              maxlength: 50,
                              rules: [
                                {
                                  required: !0,
                                  message:
                                    '\u8BF7\u8F93\u5165\u8BFE\u7A0B\u6807\u9898'
                                }
                              ],
                              name: 'videoTitle',
                              placeholder:
                                '\u8BF7\u8F93\u5165\u60A8\u7684\u8BFE\u7A0B\u6807\u9898'
                            },
                            null
                          )
                        ]
                      }
                    ),
                    s(
                      n,
                      { title: '\u8BFE\u7A0B\u5185\u5BB9', required: !0 },
                      {
                        default: () => [
                          s(
                            u,
                            {
                              modelValue: e.videoContent,
                              'onUpdate:modelValue': l => (e.videoContent = l),
                              type: 'textarea',
                              rows: '2',
                              autosize: !0,
                              showWordLimit: !0,
                              maxlength: 200,
                              rules: [
                                {
                                  required: !0,
                                  message:
                                    '\u8BF7\u8F93\u5165\u8BFE\u7A0B\u5185\u5BB9'
                                }
                              ],
                              name: 'videoContent',
                              placeholder:
                                '\u8BF7\u8F93\u5165\u60A8\u7684\u8BFE\u7A0B\u5185\u5BB9'
                            },
                            null
                          )
                        ]
                      }
                    ),
                    s(
                      n,
                      {
                        title:
                          '\u8BFE\u7A0B\u89C6\u9891\u53CA\u89C6\u9891\u5C01\u9762',
                        required: !0,
                        border: !1
                      },
                      {
                        default: () => [
                          s(
                            w,
                            {
                              justify: 'space-between',
                              style: { width: '100%', paddingTop: '12px' }
                            },
                            {
                              default: () => [
                                s(
                                  C,
                                  { span: 12 },
                                  {
                                    default: () => [
                                      s(
                                        u,
                                        {
                                          style: { padding: 0 },
                                          name: 'videoUrl',
                                          rules: [
                                            {
                                              required: !0,
                                              message:
                                                '\u8BF7\u4E0A\u4F20\u8BFE\u7A0B\u89C6\u9891'
                                            }
                                          ]
                                        },
                                        {
                                          input: () =>
                                            s(
                                              ee,
                                              {
                                                bucket: 'video-course',
                                                modelValue: e.videoUrl,
                                                'onUpdate:modelValue': l =>
                                                  (e.videoUrl = l),
                                                posterUrl: e.posterUrl,
                                                'onUpdate:posterUrl': l =>
                                                  (e.posterUrl = l),
                                                class: i.upload,
                                                tips: '\u70B9\u51FB\u4E0A\u4F20\u89C6\u9891'
                                              },
                                              null
                                            )
                                        }
                                      )
                                    ]
                                  }
                                ),
                                s(
                                  C,
                                  { span: 12 },
                                  {
                                    default: () => [
                                      s(
                                        u,
                                        {
                                          style: { padding: 0 },
                                          name: 'coverUrl',
                                          rules: [
                                            {
                                              required: !0,
                                              message:
                                                '\u8BF7\u4E0A\u4F20\u8BFE\u7A0B\u5C01\u9762'
                                            }
                                          ],
                                          error: !0
                                        },
                                        {
                                          input: () =>
                                            s(
                                              T,
                                              {
                                                class: i.upload,
                                                cropper: !0,
                                                bucket: 'video-course',
                                                options: {
                                                  fixedNumber: [1.77, 1],
                                                  autoCropWidth: 750,
                                                  autoCropHeight: 424
                                                },
                                                modelValue: e.coverUrl,
                                                'onUpdate:modelValue': l =>
                                                  (e.coverUrl = l),
                                                tips: '\u70B9\u51FB\u4E0A\u4F20\u89C6\u9891\u5C01\u9762'
                                              },
                                              null
                                            )
                                        }
                                      )
                                    ]
                                  }
                                )
                              ]
                            }
                          )
                        ]
                      }
                    )
                  ]
                })
              ])
            ),
            s(
              d,
              {
                class: i['add-item'],
                block: !0,
                icon: 'add-o',
                onClick: this.addItem
              },
              { default: () => [r('\u6DFB\u52A0\u8BFE\u7A0B')] }
            ),
            s(
              h,
              { offsetBottom: 0, position: 'bottom', zIndex: 999999 },
              {
                default: () => [
                  s('div', { class: ['btnGroup', 'btnMore'] }, [
                    s(
                      d,
                      {
                        block: !0,
                        round: !0,
                        type: 'primary',
                        plain: !0,
                        onClick: () => {
                          t.active = 1
                        }
                      },
                      { default: () => [r('\u4E0A\u4E00\u6B65')] }
                    ),
                    s(
                      d,
                      {
                        block: !0,
                        round: !0,
                        type: 'primary',
                        'native-type': 'submit'
                      },
                      { default: () => [r('\u63D0\u4EA4')] }
                    )
                  ])
                ]
              }
            )
          ]
        }
      )
    }
  }),
  fe =
    'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEwAAABMCAYAAADHl1ErAAAAAXNSR0IArs4c6QAACOhJREFUeNrtnFtTFEcUx/cpVXnKR0i+QKqSF5MoIHhBjBoBxYdUHkxSlVipinn1IWWlNErMg9GoiUnlIYm5VfmSRMAbchHBeAMWQa67y2UZWMC7sCPLbuecnntPz+zC9OKCQ9W/dpddZnp/9Dl9+vTpDgSewc8IIS9KJFEQTcofSwn5sDQnV40m5aCUlMNSMj4Jz2UUPsff0ffgM/hZ+jfwt3iNwHL+GSMzK8aST/dKc/GG0bm4DCIeJeO18Jp47WUBKRKPvxJNxj8fTcR7BQByF9wD74X3XHKgRsns61JKPg1fJJl1UHYl6b2hDTkPKkpmX4PGVkGjU88AFKsUtgXblHOgQuTeS+Ccj4ISOQDKImwTtg3bmBOwpLmZMmiQlGugOOAkbOszA0UIeUHtValch2WClsI2Y9sXt1eR+MtSKn5jqYCygYO243dYFFjjT5++Gp2Ljy5VWJrwO+B3yW7PSsTzo3Mz95c6LAPazH38TlmDBTeZWS6wTJoRDk0xw+XTs3g9TZh5onNcDj4rE5/meSCgocMSHg0XMnp6CjkwZnleYJlitaNeIvjUcwgsNe8ZgTo3lJ43WOZp1LzmnqJM8eL0FNk3ESIfjHaRHcNBsn24nWrbUBuolZQPom6RMlTkJimlukG2hm+Qd8LXqbaErlFtHviPatPAVbKp/yp5u7+FamNfM1VJ7xVSDr/fPdRO/rw3TIYTM4tjmjRF4zHrMJiYJpVTYbJjpAMUJBUqKCo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Be = '_introduction_j95ns_1'
var N = { createSubmit: he, introduction: Be }
function Fe(e) {
  return (
    typeof e == 'function' ||
    (Object.prototype.toString.call(e) === '[object Object]' && !Z(e))
  )
}
var Ue = v({
    name: 'CreateSubmit',
    computed: {
      userInfo() {
        const e = t.lessonGroup,
          o = J.user.data || {}
        return {
          username: o.username || `\u6E38\u5BA2${o.id || ''}`,
          headUrl: o.headUrl,
          lessonName: e.lessonName,
          buyNum: 0,
          lessonDesc: e.lessonDesc,
          lessonPrice: e.lessonPrice,
          lessonCoverUrl: e.lessonCoverTemplateUrl || e.lessonCoverUrl,
          lessonNum: t.lessonList.length,
          auditVersion: 0
        }
      },
      lessonList() {
        return t.lessonList || []
      }
    },
    methods: {
      async onSubmit() {
        try {
          const e = t.lessonGroup
          let o = {
            lessonList: this.lessonList,
            lessonGroup: V(S({}, e), {
              lessonCoverUrl: e.lessonCoverTemplateUrl || e.lessonCoverUrl
            })
          }
          t.groupId
            ? (await A.post('/api-teacher/videoLessonGroup/update', {
                data: o
              }),
              I.success('\u4FEE\u6539\u6210\u529F'))
            : (await A.post('/api-teacher/videoLessonGroup/add', { data: o }),
              I.success('\u521B\u5EFA\u6210\u529F')),
            setTimeout(() => {
              X({ api: 'back' })
            }, 1e3)
        } catch {}
      }
    },
    render() {
      let e
      return s('div', { class: [N.createSubmit] }, [
        s(se, { userInfo: this.userInfo }, null),
        s(G, null, {
          default: () => [
            s('p', { class: N.introduction }, [this.userInfo.lessonDesc])
          ]
        }),
        s(
          G,
          {
            title: '\u8BFE\u7A0B\u5217\u8868',
            icon: 'courseList',
            class: 'mb12'
          },
          Fe(
            (e = this.lessonList.map(o =>
              s(
                te,
                {
                  class: 'mb12',
                  detail: {
                    title: o.videoTitle,
                    content: o.videoContent,
                    imgUrl: o.coverUrl
                  }
                },
                null
              )
            ))
          )
            ? e
            : { default: () => [e] }
        ),
        s(
          h,
          { offsetBottom: 0, position: 'bottom' },
          {
            default: () => [
              s('div', { class: ['btnGroup', 'btnMore'] }, [
                s(
                  d,
                  {
                    block: !0,
                    round: !0,
                    type: 'primary',
                    plain: !0,
                    onClick: () => {
                      t.active = 2
                    }
                  },
                  { default: () => [r('\u8FD4\u56DE\u7F16\u8F91')] }
                ),
                s(
                  d,
                  {
                    block: !0,
                    round: !0,
                    type: 'primary',
                    onClick: this.onSubmit
                  },
                  { default: () => [r('\u521B\u5EFA\u5B8C\u6210')] }
                )
              ])
            ]
          }
        )
      ])
    }
  }),
  ts = v({
    name: 'Create',
    async created() {
      const e = this.$route.query
      if (((t.groupId = Number(e.groupId) || 0), !t.groupId)) return !1
      try {
        ;(document.title = '\u4FEE\u6539\u89C6\u9891\u8BFE'),
          (t.loadingStatus = !0)
        const a = (
            await A.get('/api-teacher/videoLessonGroup/selectVideoLesson', {
              params: { groupId: t.groupId }
            })
          ).data,
          o = a.lessonGroup,
          {
            auditStatus: je,
            lessonCoverUrl: B,
            lessonPrice: k,
            lessonDesc: x,
            lessonSubject: z,
            lessonName: K,
            id: Y
          } = o,
          Ee = y(o, [
            'auditStatus',
            'lessonCoverUrl',
            'lessonPrice',
            'lessonDesc',
            'lessonSubject',
            'lessonName',
            'id'
          ])
        let U = !!t.templateList.includes(B)
        ;(t.lessonGroup = {
          id: Y,
          lessonName: K,
          lessonSubject: z,
          lessonDesc: x,
          lessonPrice: k,
          lessonCoverTemplateUrl: U ? B : '',
          lessonCoverUrl: U ? '' : B
        }),
          (t.lessonList = []),
          a.detailList &&
            a.detailList.forEach(m => {
              t.lessonList.push({
                videoTitle: m.videoTitle,
                videoContent: m.videoContent,
                videoUrl: m.videoUrl,
                coverUrl: m.coverUrl,
                posterUrl: m.posterUrl
              })
            }),
          (t.loadingStatus = !1)
      } catch {}
      t.lessonGroup.lessonCoverUrl &&
      !t.templateList.includes(t.lessonGroup.lessonCoverUrl)
        ? (t.tabIndex = 2)
        : (t.tabIndex = 1)
    },
    async mounted() {
      try {
        const e = await A.get('/api-teacher/sysConfig/queryByParamName', {
          params: { paramName: 'video_lesson_service_fee' }
        })
        t.rate = e.data.paramValue
      } catch {}
    },
    render() {
      return s('div', { class: b['video-create'] }, [
        t.active <= 2
          ? s(
              h,
              { position: 'top', offsetTop: 0, zIndex: 999999 },
              {
                default: () => [
                  s(
                    O,
                    {
                      border: !1,
                      style: { paddingTop: '15px' },
                      direction: 'horizontal',
                      columnNum: '2'
                    },
                    {
                      default: () => [
                        s(L, null, {
                          default: () =>
                            s(c, null, [
                              s(F, { name: fe, size: 38 }, null),
                              s(
                                'span',
                                {
                                  class: [
                                    b.gridName,
                                    t.active >= 1 ? b.active : null
                                  ]
                                },
                                [r('\u8BFE\u7A0B\u4FE1\u606F')]
                              )
                            ])
                        }),
                        s(L, null, {
                          default: () =>
                            s(c, null, [
                              s(
                                F,
                                { name: t.active === 2 ? Ce : ve, size: 38 },
                                null
                              ),
                              s(
                                'span',
                                {
                                  class: [
                                    b.gridName,
                                    t.active === 2 ? b.active : null
                                  ]
                                },
                                [r('\u8BFE\u7A0B\u5185\u5BB9')]
                              )
                            ])
                        })
                      ]
                    }
                  )
                ]
              }
            )
          : null,
        t.active === 1 ? s(c, null, [s(ce, null, null)]) : null,
        t.active === 2 ? s(c, null, [s(be, null, null)]) : null,
        t.active === 3 ? s(c, null, [s(Ue, null, null)]) : null
      ])
    }
  })
export { ts as default }
