<div>
  {{#contentList table="(
  select
  parent,
  json_agg(json_build_object('id',code,'text',name,'color',color) order by code) as data
  from
  admin.cls
  where
  parent in
    (select cls from (
      select jsonb_array_elements(columns||filters)->>'data' as cls
      from gis.registers
      where register_id='{{register_id}}'
      )q
    where length(cls)>0)
  group by parent
  )"}}
    {{#if rows}}
    {{#each rows}}
      <div class="font-semibold text-[16px] dark:text-white my-2">{{parent}}</div>
    {{{tableList
    data
    columns="
    Код,id,
    Значення,text,
    Колір,color
    "
    }}}
    {{/each}}
     {{^}}
      <div class='bg-gray-200 text-center p-6 rounded-xl'>
        <h3 class='text-lg font-semibold'>Класифікатори не використовуються</h3>
      </div>
    {{/if}}
  {{/contentList}}
</div>
