import { defineComponent } from 'vue'; import { createNamespace } from '../utils'; import { t, bem } from './utils'; const [name] = createNamespace('calendar-header'); export default defineComponent({ name, props: { title: String, subtitle: String, showTitle: Boolean, showSubtitle: Boolean, firstDayOfWeek: Number, }, emits: ['click-subtitle'], setup(props, { slots, emit }) { const renderTitle = () => { if (props.showTitle) { const text = props.title || t('title'); const title = slots.title ? slots.title() : text; return