"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),a=require("semantic-ui-react"),c=require("@devgateway/wp-react-lib"),g=require("react-intl"),j=({pages:r,columns:s})=>{const t=r?r.sort((l,i)=>l.menu_order-i.menu_order):[],o=t.length/parseInt(s)+(t.length%parseInt(s)>0?1:0);let n=-1;return e.jsx("div",{children:e.jsx(a.Grid,{columns:s,children:[...Array(parseInt(o)).keys()].map((l,i)=>e.jsx(a.Grid.Row,{children:[...Array(parseInt(s)).keys()].map((u,d)=>(n++,e.jsx(a.Grid.Column,{children:e.jsx(c.PostIntro,{as:"div",post:t[n]})},d)))},i))})})},x=r=>{const{"data-height":s,"data-style":t,"data-columns":o,"data-parent":n,editing:l,component:i,unique:u,intl:{locale:d}}=r,h={style:t,columns:o};return e.jsxs(a.Container,{fluid:!0,className:`viz dashboard gallery ${t}`,children:[n&&e.jsx(c.PageProvider,{locale:d,parent:n,store:"gallery_"+r.parent+"_"+r.unique,perPage:100,children:e.jsx(c.PageConsumer,{children:e.jsx(j,{...h})})}),!n&&e.jsx(a.Segment,{color:"red",children:"No child pages here"})]})},m=g.injectIntl(x);exports.default=m;
