import{cF as l,F as r,b_ as n,cG as i}from"./app-BgLa5dit.js";class o extends l{get name(){return"ErrorPageError"}}const d="shared.notFoundError";class f extends o{constructor(){super(r.getPhrase(d,"title"))}get name(){return"NotFoundError"}get heading(){return r.getPhrase(d,"heading")}get description(){return r.getPhrase(d,"description")}}const u="shared.privateResourceError";class c extends o{constructor(){super(r.getPhrase(u,"title"))}get name(){return"PrivateResourceError"}get heading(){return r.getPhrase(u,"heading")}get description(){return r.getPhrase(u,"description")}}const g="shared.regionLockedResourceError";class P extends o{constructor(){super(r.getPhrase(g,"title"))}get name(){return"RegionLockedResourceError"}get heading(){return r.getPhrase(g,"heading")}get description(){return r.getPhrase(g,"description")}}const h="shared.unspecifiedError";class p extends o{constructor(){super(r.getPhrase(h,"title"))}get name(){return"UnspecifiedError"}get heading(){return r.getPhrase(h,"heading")}get description(){return r.getPhrase(h,"description")}get cta(){return!1}}const m={notFound:f,forbidden:{rating:c,yearLevel:c,region:P,privacy:c},badRequest:p,internalServerError:p};function v(e,E={},s={}){if(!e)return;let t;typeof e=="number"?t=e:t=e.status;const a={...m,...E};if(t&&n.isStatusCodeError(t)){if(t===i.InternalServer){s.internalServerError||n.throw(new p);return}if(t===i.NotFound){s.notFound||n.throw(new a.notFound);return}if(t===i.Forbidden){s.forbidden||n.throw(new a.forbidden.privacy);return}s.badRequest||n.throw(new a.badRequest)}}export{v as h};
//# sourceMappingURL=vyqb6V0P.chunk.js.map
