1import{D as s}from"./DefaultPreview-BH8UHsnU.js";import r from"./LoadMore-BamcStQ9.js";import{l as o}from"./app-BWJCW4UM.js";import{c as n}from"./content-api-DFxxJhqc.js";import{n as l}from"./_plugin-vue2_normalizer-ChkZV5ho.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"armada_541"}}catch(e){}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f6be7bbe-3db5-42c3-878e-1ef2b20b14d8",t._sentryDebugIdIdentifier="sentry-dbid-f6be7bbe-3db5-42c3-878e-1ef2b20b14d8")})()}catch(t){}const d={name:"MoreLabels",components:{DefaultPreview:s,LoadMore:r},props:{displayLoadMore:{default:!0,type:Boolean},initialPageNumber:{default:1,type:Number},limit:{default:1,type:Number},queryParameterName:{default:"page",type:String}},data:function(){return{items:[],isRequesting:!1,pageNumber:this.initialPageNumber,shouldDisplayLoadMore:this.displayLoadMore}},computed:{nextPageNumber:function(){return this.pageNumber+1}},mounted:function(){o(this.$el,void 0,[])},methods:{clickLoadMore:async function(t){this.isRequesting=!0,this.pageNumber=t;try{const e=await n.getLabels(this.pageNumber,this.limit);this.items=this.items.concat(e.items),this.isRequesting=!1,e.pagination.current_page>=e.pagination.total_pages&&(this.shouldDisplayLoadMore=!1)}catch(e){this.shouldDisplayLoadMore=!1}}}};var u=function(){var e=this,a=e._self._c;return a("div",[a("ul",{staticClass:"grid list pl0"},[e._t("default"),e._l(e.items,function(i){return a("li",{key:i.id,staticClass:"col col-6 col-2-l pb4"},[a("default-preview",{attrs:{"image-src-sets":i.imageSrcSets,title:i.title,subtitle:i.subtitle,url:i.url}})],1)})],2),e.shouldDisplayLoadMore?a("p",{staticClass:"pt6 tc"},[a("load-more",{attrs:{"is-disabled":e.isRequesting,"page-number":e.nextPageNumber,"query-parameter-name":e.queryParameterName},on:{click:e.clickLoadMore}})],1):e._e()])},f=[],c=l(d,u,f,!1,null,null);const h=c.exports;export{h as default}; 2//# sourceMappingURL=MoreLabels-Cc97AbzD.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.