define('bitbucket/internal/feature/branch/branch-list-copy', [
    'jquery',
    'bitbucket/internal/feature/branch/branch-copy',
    'bitbucket/internal/page/branches/branches-page-analytics',
    'exports'
], function(
    $,
    branchCopy,
    branchesPageAnalytics,
    exports
) {

    'use strict';

    exports.onReady = function () {
        branchCopy.bindToDropdownLink(
            '.branch-list-copy-branch-action',
            '.branch-list-action-dropdown',
            function (element) {
                return $(element).closest('[data-display-id]').attr('data-display-id');
            },
            branchesPageAnalytics.CONTEXT
        );
    };
});

jQuery(document).ready(function () {
    require('bitbucket/internal/feature/branch/branch-list-copy').onReady();
});