{#
/**
 * Section heading
 *
 * A section heading is displayed in Sections, and can have an optional ornamental frame.
 *
 * @var string $heading The main heading.
 * @var string $subheading The subheading / eyebrow heading.
 * @var array $link An optional array with `url` and `text` keys.
 * @var array $icon_data An array of icon data (e.g. `icon`, `title`, `size`, `label`, etc.)
 * @var Drupal\Core\Template\Attribute $attributes Attributes (class, data, etc.) for the entire component.
 *
 * @union-variation cu-section-heading--framed Adds a frame to the heading. Defaults to left.
 * @union-variation cu-section-heading--framed-right Places the frame to the right. Use with `cu-section-heading--framed`.
 *
 * @deprecated Section components now accept composite heading variables.
 */
#}
{% set attributes = union_attributes(attributes|default([])) %}
{% set heading_element = heading_element|default('h2') %}

<div{{ attributes.addClass('cu-section-heading')}}>
{% include '@union/_composite-heading.twig' with {
  icon_data: icon_data,
  eyebrow_heading: subheading,
  heading: heading,
  heading_element: heading_element,
  link: link,
  attributes: {
    class: [
      'cu-section-heading--meta',
      'cu-composite-heading--minimal'
    ]
  }
} only %}
</div>
