import { makeComponentProps } from '@/composables/component'
import { makeTagProps } from '@/composables/tag'
import { genericComponent, propsFactory } from '@/utils'
import { ExtractPropTypes } from 'vue'

export const makeUTableCellSupTextProps = propsFactory(
  {
    ...makeComponentProps(),
    ...makeTagProps(),
  },
  'UTableCellSupText'
)

export type UTableCellTextProps = ExtractPropTypes<
  typeof makeUTableCellSupTextProps
>

export type UTableCellSupTextSlots = {
  default: never
}

export const UTableCellSupText = genericComponent<UTableCellSupTextSlots>()({
  name: 'UTableCellSupText',

  props: makeUTableCellSupTextProps(),

  emits: {
    //
  },

  setup(props, { emit, slots }) {
    //

    return () => (
      <span class="overflow-hidden overflow-ellipsis text-text-sm font-regular text-gray-600">
        {slots.default?.()}
      </span>
    )
  },
})

export type UTableCellSupText = InstanceType<typeof UTableCellSupText>
