"use strict";(self.webpackChunkhws_provider_media=self.webpackChunkhws_provider_media||[]).push([[791],{2043:function(e,t,a){a.d(t,{j:function(){return r}});let i={GetStorageInfo:{action:"HWS_PROVIDER_MEDIA_GET_MEDIA_STORAGE_INFO",description:"Get the media storage info",inputInterface:"",example:{}},GetMediaByType:{action:"HWS_PROVIDER_MEDIA_GET_MEDIA_BY_TYPE",description:"Get the media by type",inputInterface:`interface GetMediaByType {
      MediaType: string;
    }`,example:{MediaType:"Image"}},GetMediaByTypes:{action:"HWS_PROVIDER_MEDIA_GET_MEDIA_BY_TYPES",description:"Get the media by type",inputInterface:`interface GetMediaByTypes {
      MediaType: string;
    }`,example:{MediaTypes:["Image"]}},GetLookups:{action:"HWS_PROVIDER_MEDIA_GET_LOOKUPS",description:"Get the media lookups",inputInterface:"",example:{}},DeleteMedia:{action:"HWS_PROVIDER_MEDIA_DELETE_MEDIA",description:"Delete media",inputInterface:`interface DeleteMedia {
      Id: string;
    }`,example:{Id:"1"}},GetDownloadUrl:{action:"HWS_PROVIDER_MEDIA_GET_DOWNLOAD_URL",description:"Get the media download url",inputInterface:`interface GetDownloadUrl {
      Media: string;
    }`,example:{Media:"1"}},Download:{action:"HWS_PROVIDER_MEDIA_DOWNLOAD",description:"Download media file bytes",inputInterface:`interface DownloadMedia {
      Id: string;
    }`,example:{Id:"1"},protocol:"HttpRest",route:"/media/{id}",responseType:"blob"},UploadMedia:{action:"HWS_PROVIDER_MEDIA_UPLOAD_MEDIA",description:"Upload media",inputInterface:`interface UploadMedia {
      Request: MediaUploadRequest;
    }`,example:{MediaId:"1",FileName:"1",Title:"1",Caption:"1",Description:"1",FormFile:"1",Path:"1",MediaSource:"1",MediaType:"1"}},GetMediaCount:{action:"HWS_PROVIDER_MEDIA_GET_MEDIA_COUNT",description:"Get the media count",inputInterface:`interface GetMediaCount {
      FilterText?: string | null;
      MediaType?: string | null;
    }`,example:{FilterText:"1",MediaType:"1"}},GetMedia:{action:"HWS_PROVIDER_MEDIA_GET_MEDIA",description:"Get the media",inputInterface:`interface GetMedia {
      FilterText?: string | null;
      MediaType?: string | null;
      SelectSettings: {
        PageSize?: number;
        Page?: number;
        OrderBy?: string | null;
        OrderDescendingBy?: string | null;
      }
    }`,example:{FilterText:"1",MediaType:"1",SelectSettings:{PageSize:1,Page:1,OrderBy:"1",OrderDescendingBy:"1"}}}};var n=a(6701);class r{static async getMediaCount(e,t){return await (0,n.XE)(i.GetMediaCount.action,{FilterText:e,MediaType:t})}static async getMedia(e,t,a,r,o,d){return await (0,n.XE)(i.GetMedia.action,{FilterText:e,MediaType:t,SelectSettings:{PageSize:a,Page:r,OrderBy:o,OrderDescendingBy:d}})}static async getLookups(){return await (0,n.XE)(i.GetLookups.action,null)}static async getDownloadUrl(e){return await (0,n.XE)(i.GetDownloadUrl.action,{Media:e})}static async getMediaByType(e){return await (0,n.XE)(i.GetMediaByType.action,{MediaType:e})}static async getMediaByTypes(e){return await (0,n.XE)(i.GetMediaByTypes.action,{MediaTypes:e})}static async upload(e,t){let a=new FormData;return a.append("MetaData",JSON.stringify({FileName:e})),a.append("FormFile",t),a.append("Action",i.UploadMedia.action),await (0,n.EA)(a)}async update(e,t){let a=new FormData;return a.append("MetaData",JSON.stringify(e)),null!=t&&a.append("FormFile",t),a.append("Action",i.UploadMedia.action),await (0,n.EA)(a)}static async getStorageInfo(){return await (0,n.XE)(i.GetStorageInfo.action,null)}static async delete(e){return await (0,n.XE)(i.DeleteMedia.action,{Id:e})}static async download(e){try{return await (0,n.XE)(i.Download.action,{Id:e},{protocol:"HttpRest"})}catch(e){return e}}}},2899:function(e,t,a){a.r(t),a.d(t,{default:function(){return o},launchMedia:function(){return r}});var i={};a.r(i);var n=a(2043);function r(){window.HWS.mediaprovider||(window.HWS.mediaprovider={});let e=window.HWS.mediaprovider;Object.entries({MediaTypes:i,Media:i,MediaProviderAPIs:n.j}).forEach(t=>{let[a,i]=t;e[a]||(e[a]=i)})}var o=r},6701:function(e,t,a){function i(e){let t=window;if(!t.core||!t.core[e]){console.warn(`[coreExports] window.core.${String(e)} not ready`);return}return t.core[e]}a.d(t,{EA:function(){return r},Eb:function(){return n},XE:function(){return o}}),i("Error404Page"),i("FusePageCarded");let n=i("FuseLoading");i("FuseDialog"),i("FuseSvgIcon"),i("FusePageSimple"),i("FuseSplashScreen"),i("NavLinkAdapter"),i("Store"),i("UnAuthorized"),i("useThemeMediaQuery"),i("ErrorBoundary"),i("FuseLayout"),i("FuseTheme"),i("ThemeLayouts"),i("BrowserRouter"),i("FuseUtils"),i("WithRouter"),i("History"),i("HUIDynamic"),i("HWSRoutes"),i("HWSContext"),i("HorizechWorkspaceProvider"),i("useHorizechWorkspace"),i("RunAction");let r=i("RunFormAction"),o=i("InvokeAction");i("APIResult")}}]);