<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>
<?import org.controlsfx.control.TaskProgressView?>
<?import org.controlsfx.glyphfont.Glyph?>

<VBox fx:id="root" prefHeight="468.0" prefWidth="737.0" xmlns="http://javafx.com/javafx/22"
      xmlns:fx="http://javafx.com/fxml/1"
      fx:controller="com.ecep.contract.controller.HomeWindowController">
  <children>
    <MenuBar>
      <menus>
        <Menu text="文件(_F)">
          <items>
            <MenuItem mnemonicParsing="false" text="Action 1"/>
            <MenuItem mnemonicParsing="false" onAction="#openConfigWindow" text="选项…"/>
            <Menu text="数据源">
              <MenuItem mnemonicParsing="false" onAction="#openGroupRKResourceWindow" text="集团相关方…"/>
              <MenuItem mnemonicParsing="false" onAction="#openTycResourceWindow" text="天眼查…"/>
            </Menu>
          </items>
        </Menu>
        <Menu mnemonicParsing="false" text="公司">
          <items>
                    </items>
        </Menu>
        <Menu mnemonicParsing="false" text="用友U8">
          <items>
            <MenuItem mnemonicParsing="false" onAction="#createNewU8ContractSyncTaskAction"
                                              text="同步合同"/>
            <MenuItem mnemonicParsing="false" onAction="#openYongYouResourceWindow" text="用友U8…"/>
          </items>
        </Menu>
        <Menu text="设置(_S)">
          <items>
            <MenuItem onAction="#onShowEmployeeManagerWindowAction" text="员工管理(_E)"/>
            <MenuItem onAction="#onShowDepartmentManagerWindowAction" text="部门管理(_D)"/>
            <MenuItem onAction="#onShowRolesManagerWindowAction" text="角色管理(_R)"/>
            <MenuItem onAction="#onShowFunctionManagerWindowAction" text="功能管理(_R)"/>
            <SeparatorMenuItem mnemonicParsing="false"/>
            <MenuItem onAction="#onShowBankManagerWindowAction" text="银行管理(_B)"/>
            <SeparatorMenuItem mnemonicParsing="false"/>
            <MenuItem onAction="#onShowTaskMonitorWindowAction" text="任务监控(_M)"/>
            <SeparatorMenuItem mnemonicParsing="false"/>
            <MenuItem onAction="#onShowInventoryManagerWindowAction" text="存货管理(_I)"/>
          </items>
        </Menu>
        <Menu text="帮助(_H)">
          <items>
            <MenuItem mnemonicParsing="false" onAction="#openInBrowse" text="国家企业信用信息公示系统"
                                              userData="https://www.gsxt.gov.cn/"/>
            <MenuItem mnemonicParsing="false" onAction="#openInBrowse" text="天眼查-商业查询平台"
                                              userData="https://www.tianyancha.com/"/>
            <MenuItem mnemonicParsing="false" text="关于"/>
          </items>
        </Menu>
      </menus>
    </MenuBar>
    <ToolBar prefHeight="40.0" prefWidth="200.0">
      <items>
        <Button fx:id="openCompanyManagerWindow" mnemonicParsing="false" style="-fx-padding: 6px;"
                        userData="com.ecep.contract.manager.ds.company.controller.CompanyManagerWindowController">
          <graphic>
            <VBox alignment="CENTER">
              <children>
                <ImageView fitHeight="46.0" fitWidth="64.0">
                  <viewport>
                    <Rectangle2D height="46.0" width="64.0"/>
                  </viewport>
                  <image>
                    <Image url="@img/f4.png"/>
                  </image>
                </ImageView>
                <Label text="公司">
                  <VBox.margin>
                    <Insets top="5.0"/>
                  </VBox.margin>
                </Label>
              </children>
            </VBox>
          </graphic>
        </Button>
        <Button fx:id="openProjectManagerWindow" mnemonicParsing="false" style="-fx-padding: 6px;">
          <graphic>
            <VBox alignment="CENTER">
              <children>
                <ImageView fitHeight="46.0" fitWidth="64.0">
                  <Image url="@img/f0.png"/>
                  <viewport>
                    <Rectangle2D height="46.0" width="64.0"/>
                  </viewport>
                </ImageView>
                <Label text="项目">
                  <VBox.margin>
                    <Insets top="5.0"/>
                  </VBox.margin>
                </Label>
              </children>
            </VBox>
          </graphic>
        </Button>
        <Button fx:id="openContractManagerWindow" mnemonicParsing="false" style="-fx-padding: 6px;">
          <graphic>
            <VBox alignment="CENTER">
              <children>
                <ImageView fitHeight="46.0" fitWidth="64.0">
                  <Image url="@img/f1.png"/>
                  <viewport>
                    <Rectangle2D height="46.0" width="64.0"/>
                  </viewport>
                </ImageView>
                <Label text="合同">
                  <VBox.margin>
                    <Insets top="5.0"/>
                  </VBox.margin>
                </Label>
              </children>
            </VBox>
          </graphic>
        </Button>
        <Button fx:id="openVendorManagerWindow" mnemonicParsing="false" style="-fx-padding: 6px;">
          <graphic>
            <VBox alignment="CENTER">
              <children>
                <ImageView fitHeight="46.0" fitWidth="64.0">
                  <Image url="@img/f2.png"/>
                  <viewport>
                    <Rectangle2D height="46.0" width="64.0"/>
                  </viewport>
                </ImageView>
                <Label text="供应商">
                  <VBox.margin>
                    <Insets top="5.0"/>
                  </VBox.margin>
                </Label>
              </children>
            </VBox>
          </graphic>
        </Button>
        <!-- 客户 -->
        <Button fx:id="openCustomManagerWindow" layoutX="138.0" layoutY="10.0" mnemonicParsing="false"
                                style="-fx-padding: 6px;">
          <graphic>
            <VBox alignment="CENTER">
              <children>
                <ImageView fitHeight="46.0" fitWidth="64.0">
                  <Image url="@img/f3.png"/>
                  <viewport>
                    <Rectangle2D height="46.0" width="64.0"/>
                  </viewport>
                </ImageView>
                <Label text="客户">
                  <VBox.margin>
                    <Insets top="5.0"/>
                  </VBox.margin>
                </Label>
              </children>
            </VBox>
          </graphic>
        </Button>
      </items>
      <opaqueInsets>
        <Insets/>
      </opaqueInsets>
      <padding>
        <Insets bottom="6.0" left="6.0" right="6.0" top="6.0"/>
      </padding>
    </ToolBar>
    <AnchorPane prefHeight="248.0" prefWidth="2239.0" VBox.vgrow="ALWAYS"/>
    <TaskProgressView fx:id="taskProgressView"/>
    <HBox fx:id="statusBar" spacing="5.0">
      <children>
        <Label fx:id="leftStatusLabel" text="Label" wrapText="true"/>
        <Pane prefHeight="12.0" prefWidth="12.0" HBox.hgrow="ALWAYS"/>
        <Label fx:id="rightStatusLabel" layoutX="10.0" layoutY="10.0" text="-" wrapText="true"
                               HBox.hgrow="SOMETIMES">
          <HBox.margin>
            <Insets left="6.0"/>
          </HBox.margin>
        </Label>
        <Glyph fx:id="webSocketMonitorIcon" fontFamily="FontAwesome" icon="CHAIN"/>
        <Label fx:id="webSocketMonitorLabel" text="WebSocket"/>
        <Label fx:id="taskMonitorLabel" text="任务监控"/>
        <Label fx:id="employeeStatusLabel" layoutX="711.0" layoutY="10.0" text="管理员" wrapText="true"
                               HBox.hgrow="SOMETIMES">
          <HBox.margin>
            <Insets left="6.0"/>
          </HBox.margin>
        </Label>
      </children>
    </HBox>
  </children>
</VBox>
