import { App } from 'vue'
import * as components from '@element-plus/icons-vue'

export default {
  install(app: App): void {
    Object.keys(components).forEach((key) => {
      const componentConfig = components[key as keyof typeof components]
      if (componentConfig && typeof componentConfig === 'object' && 'name' in componentConfig) {
        app.component(componentConfig.name, componentConfig)
      }
    })
  }
}