@imagepath: "../../dist";

// For logos built in SVG. Pass in the SVG's viewbox dimensions.
// It's assumed that each logo's viewbox is proportional to others in the set.
.logo-in-header(@img, @width, @height, @factor: 4) {
    & .aui-header-logo-device {
        @proportion: (@height / @factor) / 24; // because the logo height should always be around 24px.
        background-image: url(@img);
        width: (@width / @factor) * 1px;
    }
}

.aui-header {
    // atlassian itself
    .aui-header-logo-atlassian {
        .logo-in-header("@{imagepath}/atlassian/atlassian-horizontal-white.svg", 540, 67);
    }

    // products
    .aui-header-logo-bamboo {
        .logo-in-header("@{imagepath}/products/bamboo-white.svg", 411, 128);
    }
    .aui-header-logo-bitbucket,
    .aui-header-logo-stash {
        .logo-in-header("@{imagepath}/products/bitbucket-white.svg", 446, 128);
    }
    .aui-header-logo-clover {
        .logo-in-header("@{imagepath}/products/clover-white.svg", 329.3, 70.35);
    }
    .aui-header-logo-confluence {
        .logo-in-header("@{imagepath}/products/confluence-white.svg", 512, 128);
    }
    .aui-header-logo-crowd {
        .logo-in-header("@{imagepath}/products/crowd-white.svg", 335, 128);
    }
    .aui-header-logo-crucible {
        .logo-in-header("@{imagepath}/products/crucible-white.svg", 389, 128);
    }
    .aui-header-logo-fisheye {
        .logo-in-header("@{imagepath}/products/fisheye-white.svg", 378, 128);
    }
    .aui-header-logo-hipchat {
        .logo-in-header("@{imagepath}/products/hipchat-white.svg", 383, 128);
    }
    .aui-header-logo-jira {
        .logo-in-header("@{imagepath}/products/jira-white.svg", 213, 128);
        // jira product variants
        &.with-core {
            .logo-in-header("@{imagepath}/products/jira-with-core-white.svg", 208, 128);
        }
        &.with-software {
            .logo-in-header("@{imagepath}/products/jira-with-software-white.svg", 207, 128);
        }
        &.with-service-desk {
            .logo-in-header("@{imagepath}/products/jira-with-service-desk-white.svg", 213, 128);
        }
    }
    // jira product distinct flavours
    .aui-header-logo-jira-core {
        .logo-in-header("@{imagepath}/products/jira-core-white.svg", 398, 128);
    }
    .aui-header-logo-jira-software {
        .logo-in-header("@{imagepath}/products/jira-software-white.svg", 584, 128);
    }
    .aui-header-logo-jira-service-desk {
        .logo-in-header("@{imagepath}/products/jira-service-desk-white.svg", 706, 128);
    }

    // sites, programs, and other intellectual properties
    .aui-header-logo-answers,
    .aui-header-logo-community {
        // this is now called 'community'
        .logo-in-header("@{imagepath}/programs/atlassian-community-white.svg", 1007.656, 82.778, 5);
    }
    .aui-header-logo-developers {
        .logo-in-header("@{imagepath}/programs/atlassian-developer-white.svg", 955.119, 82.25, 5);
    }
    .aui-header-logo-experts,
    .aui-header-logo-partner-program {
        .logo-in-header("@{imagepath}/programs/atlassian-partner-program-white.svg", 1187.44, 82.78, 5);
    }
    .aui-header-logo-marketplace {
        .logo-in-header("@{imagepath}/programs/atlassian-marketplace-white.svg", 1037.753, 82.25, 5);
    }
    .aui-header-logo-support {
        .logo-in-header("@{imagepath}/programs/atlassian-support-white.svg", 861.492, 82.25, 5);
    }
    .aui-header-logo-university {
        .logo-in-header("@{imagepath}/programs/atlassian-university-white.svg", 937.52, 82.78, 5);
    }
}
