/*
 * @Author: micky
 * @Date: 2024-08-10 15:24:06
 * @LastEditors: micky
 * @LastEditTime: 2024-09-16 12:33:33
 * @FilePath: \chargingpile-uniapp\src\main.ts
 */
import { createSSRApp } from 'vue'
import App from './App.vue'
import plugins from './plugins'
import { setupRouter } from './router'
import './styles/index.scss'
import TContainer from './components/design-container.vue'
import TSearch from './components/design-search.vue'
import TIcon from './components/design-icon.vue'
import TCard from './components/design-card.vue'
import TInputField from './components/design-input-field.vue'
import TSelectField from './components/design-select-field.vue'
import TRadioField from './components/design-radio-field.vue'
import TTextareaField from './components/design-textarea-field.vue'
import AdvanceCityPicker from './components/advance-city-picker.vue'
import TPicker from './components/design-picker-field.vue'
import TMapField from './components/design-map-field.vue'
import TFooterBtn from './components/design-footer-btn.vue'
import AdvanceCalendar from './components/advance-calendar.vue'
import TForm from './components/design-form.vue'
import TFormItem from './components/design-form-item.vue'
import TProfile from './components/design-profile.vue'
import TTable from './components/design-table.vue'
import TDateTimePicker from './components/datetime-picker.vue'
import TFeedBack from './components/design-feedback.vue'
import TMultiSelect from './components/design-multiselect-field.vue'
import TSwitchField from './components/design-switch-field.vue'
export function createApp() {
    const app = createSSRApp(App)

    Promise.resolve().then(() => {
        setupRouter()
    })
    app.use(plugins)
    app.component('TContainer', TContainer)
    app.component('TSearch', TSearch)
    app.component('TIcon', TIcon)
    app.component('TCard', TCard)
    app.component('TInputField', TInputField)
    app.component('TSelectField', TSelectField)
    app.component('TRadioField', TRadioField)
    app.component('TTextareaField', TTextareaField)
    app.component('AdvanceCityPicker', AdvanceCityPicker)

    app.component('TPicker', TPicker)
    app.component('TMapField', TMapField)
    app.component('TFooterBtn', TFooterBtn)
    app.component('AdvanceCalendar', AdvanceCalendar)
    app.component('TForm', TForm)
    app.component('TFormItem', TFormItem)
    app.component('TProfile', TProfile)
    app.component('TTable', TTable)
    app.component('TDateTimePicker', TDateTimePicker)
    app.component('TFeedBack', TFeedBack)
    app.component('TMultiSelect', TMultiSelect)
    app.component('TSwitchField', TSwitchField)
    return {
        app
    }
}
