import { isLayout, mapStateToLayoutProps, rankWith } from '@jsonforms/core';
import { html, repeat } from '@microsoft/fast-element';
import { LAYOUT_RANK } from './RenderersRanks';
export const LayoutRendererTemplate = html `
  <template>
    <div>
      ${repeat((x) => x.control.uischema.elements, html `
          <dispatch-renderer
            ?submitted=${(x, ctx) => ctx.parent.submitted}
            :dispatch=${(x, ctx) => ctx.parent.dispatch}
            :jsonforms=${(x, ctx) => ctx.parent.jsonforms}
            :props=${(x, ctx) => ({
    uischema: x,
    schema: ctx.parent.control.schema,
    renderers: ctx.parent.control.renderers,
    path: ctx.parent.control.path,
    enabled: ctx.parent.control.enabled,
})}
          ></dispatch-renderer>
        `)}
    </div>
  </template>
`;
export const LayoutRendererEntry = {
    renderer: LayoutRendererTemplate,
    tester: rankWith(LAYOUT_RANK, isLayout),
    mapper: mapStateToLayoutProps,
};
//# sourceMappingURL=LayoutRenderer.js.map