////////////////////////////////////////////////////////////////////////////////
//
//  Licensed to the Apache Software Foundation (ASF) under one or more
//  contributor license agreements.  See the NOTICE file distributed with
//  this work for additional information regarding copyright ownership.
//  The ASF licenses this file to You under the Apache License, Version 2.0
//  (the "License") you may not use this file except in compliance with
//  the License.  You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////

// Jewel ButtonBar
$border-radius: .25rem

// ButtonVar variables
.jewel.buttonbar

    .jewel.button, .jewel.togglebutton
        border-radius: 0

        &.first
            border-top-left-radius: $border-radius
            border-bottom-left-radius: $border-radius

        &.last
            border-top-right-radius: $border-radius
            border-bottom-right-radius: $border-radius

j|ButtonBar
    IBeadModel: ClassReference("org.apache.royale.jewel.beads.models.ButtonBarModel")
    IBeadView:  ClassReference("org.apache.royale.jewel.beads.views.ButtonBarView")			
    IBeadController: ClassReference("org.apache.royale.jewel.beads.controllers.ListSingleSelectionMouseController")
    IBeadLayout: ClassReference("org.apache.royale.jewel.beads.layouts.ButtonBarLayout")
    IDataProviderItemRendererMapper: ClassReference("org.apache.royale.html.beads.SelectionDataItemRendererFactoryForCollectionView")
    IItemRendererClassFactory: ClassReference("org.apache.royale.core.ItemRendererClassFactory")
    IItemRenderer: ClassReference("org.apache.royale.jewel.itemRenderers.ButtonBarItemRenderer")
    IItemRendererInitializer: ClassReference("org.apache.royale.jewel.beads.itemRenderers.ButtonBarItemRendererInitializer")

@media -royale-swf
    j|ButtonBar
        IContentView: ClassReference("org.apache.royale.jewel.supportClasses.list.DataGroup")


// IconButtonBar
j|IconButtonBar
    IItemRenderer: ClassReference("org.apache.royale.jewel.itemRenderers.IconButtonBarItemRenderer")
    // this requires in App to define in CSS -> iconClass: ClassReference("org.apache.royale.icons.MaterialIcon")

// ToggleButtonBar

.jewel.buttonbar
    &.toggle-on-click
        .jewel.togglebutton
            &.selected
                pointer-events: none

j|ToggleButtonBar
    IBeadView: ClassReference("org.apache.royale.jewel.beads.views.ToggleButtonBarView")
    IBeadController: ClassReference("org.apache.royale.jewel.beads.controllers.ToggleButtonBarSelectionMouseController")
    IItemRenderer: ClassReference("org.apache.royale.jewel.itemRenderers.ToggleButtonBarItemRenderer")
    // this requires in App to define in CSS -> iconClass: ClassReference("org.apache.royale.icons.MaterialIcon")