import { defineComponent, provide } from 'vue'
export default defineComponent({
  name: 'CipConfigProvide',
  inheritAttrs: true,
  props: {
    searchReset: {
      type: Boolean,
      default: false
    },
    searchGrid: {
      type: [Boolean, Number]
    },
    limit: {
      type: Object,
      default: () => ({})
    },
    buttonConfigMap: Object, // 用于cip-button全局配置
    layout: {
      type: Object,
      default: () => ({})
    },
    number: {
      type: Object,
      default: () => ({})
    },
    paginationCompact: Boolean, // 用于cip-pagination是否开启紧凑模式(注: 数据中台使用紧凑模式)
    customInputComponents: Object,
    withQuery: {
      type: Boolean,
      default: undefined
    }
  },
  setup (props, { slots }) {
    provide('cip-config', props)
    return () => slots.default?.()
  }
})
