'use client'

import { createComponent } from '@lit/react'
import { PktIcon as PktEl } from '@oslokommune/punkt-elements'
// eslint-disable-next-line no-restricted-syntax -- React is required for createComponent
import React, { FC } from 'react'
import type { Booleanish } from 'shared-types'

import { PktElConstructor, PktElType } from '@/interfaces/IPktElements'

interface IPktIcon extends PktElType {
  name?: string
  path?: string
  'aria-hidden'?: Booleanish | undefined
}

export const PktIcon: FC<IPktIcon> = createComponent({
  tagName: 'pkt-icon',
  elementClass: PktEl as PktElConstructor<HTMLElement>,
  react: React,
  displayName: 'PktIcon',
  events: {},
})
