"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../../Class/Functional");
const _ids_1 = require("../../../../_ids");
class Share extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['data'],
            o: [],
        }, {
            input: {},
        }, system, _ids_1.ID_SHARE);
    }
    async f({ data }, done) {
        const { api: { navigator: { share }, }, } = this.__system;
        try {
            await share(data);
        }
        catch (err) {
            done(undefined, err.message);
            return;
        }
        done();
    }
}
exports.default = Share;
//# sourceMappingURL=index.js.map