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