Liferay.Loader.define("@liferay/search-experiences-web@3.0.7/sxp_blueprint_admin/js/hooks/useFetchData",["module","exports","require","liferay!frontend-js-react-web$react","../utils/fetch"],(function(e,t,a){window;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a("liferay!frontend-js-react-web$react"),c=a("../utils/fetch");var f=function({resource:e,init:t,getData:a=(e=>e),defaultValue:f=[]}){const[i,n]=(0,r.useState)(f),u=()=>{(0,c.fetchData)(e,t).then((e=>n(a(e)))).catch((()=>n(f)))};return(0,r.useEffect)((()=>{u()}),[]),{data:i,refetch:u}};t.default=f}));
//# sourceMappingURL=useFetchData.js.map