/**
 * (EU layout and header menu item shapes — smoke assignability).
 */
import type { EUPageLayoutProps, EUHeaderItemsProps } from '@/models/ui/layout'

describe('[models/ui/layout]', () => {
  describe('EUPageLayoutProps', () => {
    it('requires title, header image and children', () => {
      const props: EUPageLayoutProps = {
        title: 'Title',
        headerImageSrc: '/img.png',
        children: null,
      }
      expect(props.title).toBe('Title')
      expect(props.headerImageSrc).toBe('/img.png')
    })
  })

  describe('EUHeaderItemsProps', () => {
    it('supports nested subItems', () => {
      const items: EUHeaderItemsProps = [
        { title: 'Home', url: '/' },
        {
          title: 'API',
          url: '/api',
          subItems: [{ title: 'List', url: '/api/list' }],
        },
      ]
      expect(items).toHaveLength(2)
      expect(items[0].title).toBe('Home')
      expect(items[1].subItems).toHaveLength(1)
    })
  })
})
