1import{$n as e,Zn as t,_ as n,b as r,mt as i,tr as a,xt as o,y as s,z as c}from"./runtime-core.esm-bundler-DPmoNEl9.js";import{F as l,I as u,L as d,R as f}from"./meilisearchLocale-BuFIYjty.js";var p,m=(d(p={name:`AisStateResults`,mixins:[l({connector:!0}),f({name:`StateResults`})],props:{catchError:{type:Boolean,default:!1}},data:function(){var e=this;return{renderFn:function(){var t=e.instantSearchInstance,n=t.status,r=t.error,i=e.getParentIndex().getResults(),a=e.getParentIndex().getHelper();e.state={results:i,state:a?a.state:null,status:n,error:r}}}},created:function(){this.instantSearchInstance.addListener(`render`,this.renderFn),this.renderFn()}},`beforeUnmount`,function(){this.widget&&(this.instantSearchInstance.removeListener(`render`,this.renderFn),this.errorFn&&this.instantSearchInstance.removeListener(`error`,this.errorFn))}),d(p,`watch`,{catchError:{immediate:!0,handler:function(e){e?(this.errorFn=function(){},this.instantSearchInstance.addListener(`error`,this.errorFn)):this.errorFn&&=(this.instantSearchInstance.removeListener(`error`,this.errorFn),void 0)}}}),d(p,`computed`,{stateResults:function(){var e=this.state,t=e.results,n=e.state,r=e.status,i=e.error;return u({},t,{results:t,state:n,status:r,error:i})}}),p),h=n(`p`,null,` Use this component to have a different layout based on a certain state. `,-1),g=n(`p`,null,`Fill in the slot, and get access to the following things:`,-1);function _(l,u,d,f,p,m){return l.state&&l.state.state&&l.state.results?(i(),r(`div`,{key:0,class:t(l.suit())},[o(l.$slots,`default`,e(c(m.stateResults)),function(){return[h,g,n(`pre`,null,`results: `+a(Object.keys(l.state.results)),1),n(`pre`,null,`state: `+a(Object.keys(l.state.state)),1),n(`pre`,null,`status: `+a(l.state.status),1),n(`pre`,null,`error: `+a(l.state.error),1)]})],2)):s(``,!0)}var v={...m,render:_};export{v as t};
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.