import { Box } from '../atoms/box.js'
import { Tags } from '../molecules/tags.js'
import { ValidationError } from '../routing/error-handler.js'
import h from '../shared/h.js'

export function PageTags ({ _model, ...props }) {
  if (_model.tags.length < 1) {
    throw new ValidationError()
  }

  return h(Box, { ...props, className: 'rounded-2xl bg-bga text-txa' },
    h(Tags, { _model })
  )
}
