/**
 * @author 1902 Software
 * @copyright Copyright © 2023 1902 Software (https://1902software.com/magento/)
 * @package WriteTextAI_WriteTextAI
 */

define([
    'Magento_Ui/js/lib/view/utils/async',
    'Magento_Ui/js/grid/toolbar'
], function ($, Toolbar) {
    'use strict';

    return Toolbar.extend({
        defaults: {
            tooltipSelector: '.wtai-tooltip .admin__field-tooltip-action'
        },

        /** @inheritdoc */
        run: function () {
            this._super();

            $(this.tooltipSelector).dropdown({
                parent: '.admin__field-tooltip',
                autoclose: true
            });
        }
    });
});
