'use strict';
import { oDataComparisonTypes } from '../../../fd-toolbox/odata/odata-enums.js';
import { resourceNames } from '../../../fd-toolbox/resources/resource-names.js';
import { singleOrUndefinedWithWarning } from '../../../fd-toolbox/server/collections/single-funcs.js';
import { getResourcesWithOData, deleteResource } from '../../meta/server/db/db.js';
import { blobProps } from '../../meta/core/resources/blob/blob-props.js';
import { getODataBuilder } from '../../../fd-toolbox/odata/odata-builder-funcs.js';

var __defProp=Object['defineProperty'],__name=(_0x3c478f,_0x3a337e)=>__defProp(_0x3c478f,'name',{'value':_0x3a337e,'configurable':!![]});async function getBlobsByUrl(_0x1d7220){const _0x2e1048=getODataBuilder()['filter'](blobProps['blobUrl'],_0x1d7220,void(0x39*0xa6+0x15a*0x4+-0x13f*0x22),{'comparisonType':oDataComparisonTypes['equal']})['build']();return getResourcesWithOData(resourceNames['blob'],_0x2e1048);}__name(getBlobsByUrl,'getBlobsByUrl');async function deleteBlobByUrl(_0x50879f){let _0x3e5d09;const _0x274c32=singleOrUndefinedWithWarning(await getBlobsByUrl(_0x50879f));return _0x274c32&&(_0x3e5d09=deleteResource(_0x274c32['id'],resourceNames['blob'])),_0x3e5d09;}__name(deleteBlobByUrl,'deleteBlobByUrl');

export { deleteBlobByUrl, getBlobsByUrl };
