define([
    'jquery',
    'underscore',
    'uiRegistry',
    'Magento_Ui/js/modal/modal-component',
], function ($, _, registry, modal) {
    'use strict';

    return modal.extend({
        openModal: function (s, rowIndex) {
            this._super();


            console.log("Modal " + s + ' ' + rowIndex);
            let ds = registry.get(s);
            let id = ds.data.items[rowIndex].id;
            let details = registry.get('filoblu_flow_log_listing.filoblu_flow_log_listing.details.errorDetail');
            details.autoRender = false;
            details.updateData({id: id});
        }
    });
});