ProfileLabel < UIWidget
  background-color: alpha
  text-offset: 3 1
  focusable: true
  height: 16
  font: verdana-11px-rounded
  text-align: left

  $focus:
    background-color: #00000055

  Button
    id: remove
    !text: tr('X')
    anchors.right: parent.right
    anchors.verticalCenter: parent.verticalCenter
    width: 14
    height: 14
    margin-right: 3
    text-align: center
    text-offset: 0 1
    tooltip: Remove profile from the list.

SupplySpinBox < SpinBox
  height: 20
  margin-left: 3
  width: 75
  minimum: 0
  maximum: 9999
  text-align: center
  focusable: true
  text: 0

ItemPanel < Panel
  height: 38

  BotItem
    id: id
    anchors.left: parent.left
    anchors.bottom: parent.bottom

  SupplySpinBox
    id: min
    anchors.left: prev.right
    anchors.bottom: parent.bottom
  
  SupplySpinBox
    id: max
    anchors.left: prev.right
    anchors.bottom: parent.bottom

  SupplySpinBox
    id: avg
    anchors.left: prev.right
    anchors.bottom: parent.bottom
    width: 50    

  UIWidget
    anchors.left: min.left
    anchors.bottom: min.top
    width: 75
    text-align: center
    font: verdana-11px-rounded
    text: Min
    tooltip: Amount of given supplies for bot to leave the spawn.

  UIWidget
    anchors.left: max.left
    anchors.bottom: max.top
    width: 75
    text-align: center
    font: verdana-11px-rounded
    text: Max
    tooltip: Amount of given supplies to purchase

  UIWidget
    anchors.left: avg.left
    anchors.bottom: avg.top
    width: 55
    text-align: center
    font: verdana-11px-rounded
    text: AVG
    !tooltip: ("This is average consumption of supplies by round to help calculate the amount to purchase\n (info provided by CaveBot Stats)")

SuppliesWindow < MainWindow
  !text: tr('Supplies')
  size: 430 330
  @onEscape: self:hide()

  VerticalSeparator
    id: sep
    anchors.top: parent.top
    anchors.right: parent.right
    margin-right: 140
    anchors.bottom: bottomSep.top
    margin-bottom: 5
    margin-left: 10
    visible: false

  Label
    anchors.left: sep.right
    anchors.right: parent.right
    anchors.top: parent.top
    margin-left: 10
    margin-top: 3
    text-align: center
    text: Additional Conditions:

  HorizontalSeparator
    anchors.top: prev.bottom
    anchors.left: prev.left
    anchors.right: prev.right
    margin-top: 3

  BotSwitch
    id: SoftBoots
    anchors.top: prev.bottom
    anchors.left: sep.right
    anchors.right: parent.right
    margin-top: 5
    margin-left: 10
    text: No Soft
    tooltip: Go refill if there's no more active soft boots.     

  BotSwitch
    id: capSwitch
    height: 20
    anchors.left: SoftBoots.left
    anchors.right: parent.right
    anchors.top: prev.bottom
    margin-top: 5
    margin-right: 50
    text-align: center
    text: Cap Below:
    tooltip: Go refill if capacity is below set value.

  BotTextEdit
    id: capValue
    size: 40 20
    anchors.left: prev.right
    anchors.right: parent.right
    anchors.top: prev.top
    margin-left: 5

  BotSwitch
    id: staminaSwitch
    height: 20
    anchors.left: SoftBoots.left
    anchors.right: parent.right
    anchors.top: prev.bottom
    margin-top: 5
    margin-right: 50
    text-align: center
    text: Stamina:
    tooltip: Go refill if stamina is below set value. (in minutes)

  BotTextEdit
    id: staminaValue
    size: 40 20
    anchors.left: prev.right
    anchors.right: parent.right
    anchors.top: prev.top
    margin-left: 5

  BotSwitch
    id: imbues
    anchors.top: prev.bottom
    anchors.left: sep.right
    anchors.right: parent.right
    margin-top: 5
    margin-left: 10
    text: No Imbues
    tooltip: Go refill when mana leech imbue has worn off.

  TextList
    id: profiles
    anchors.top: prev.bottom
    margin-top: 5
    anchors.left: prev.left
    anchors.right: prev.right
    anchors.bottom: bottomSep.top
    margin-bottom: 25
  
  BotButton
    id: newProfile
    anchors.left: prev.left
    anchors.top: prev.bottom
    size: 35 15
    text: New
    font: cipsoftFont
    tooltip: Create new supplies profile.

  VerticalScrollBar
    id: itemsScrollBar
    anchors.top: items.top
    anchors.bottom: items.bottom
    anchors.right: items.right
    step: 14
    pixels-scroll: true

  ScrollablePanel
    id: items
    anchors.top: parent.top
    anchors.left: parent.left
    anchors.right: sep.left
    anchors.bottom: bottomSep.top
    margin-bottom: 8
    vertical-scrollbar: itemsScrollBar
    layout: verticalBox

  HorizontalSeparator
    id: bottomSep
    anchors.left: parent.left
    anchors.right: parent.right
    anchors.bottom: closeButton.top
    margin-bottom: 8

  Button
    id: closeButton
    !text: tr('Close')
    font: cipsoftFont
    anchors.right: parent.right
    anchors.bottom: parent.bottom
    size: 45 21
    margin-top: 15   
    tooltip: Close supplies window and save settings.
    @onClick: self:getParent():hide()

  Button
    id: increment
    anchors.verticalCenter: prev.verticalCenter
    anchors.right: items.right
    text: +
    width: 50
    tooltip: increase all max supplies amount by average

  Button
    id: decrement
    anchors.verticalCenter: prev.verticalCenter
    anchors.right: prev.left
    margin-right: 3
    text: -
    width: 50
    tooltip: decrease all max supplies amount by average