import { __awaiter } from "tslib";
import BaseDeleterApiConsumer from '../base-deleter-api-consumer/base-deleter-api-consumer';
export default class SdkDeleterApiConsumer extends BaseDeleterApiConsumer {
    constructor(SDKMethod) {
        super();
        this.SDKMethod = SDKMethod;
    }
    deleteItem({ id }) {
        return this._deleteItem([id]);
    }
    deleteNestedItem({ parentId, id }) {
        return this._deleteItem([parentId, id]);
    }
    _deleteItem(args) {
        return __awaiter(this, void 0, void 0, function* () {
            try {
                return this.SDKMethod(...args);
            }
            catch (err) {
                throw err;
            }
        });
    }
}
//# sourceMappingURL=sdk-deleter-api-consumer.js.map