---
openapi: 3.0.1
info:
  title: UI Customization API
  description: API for getting customization of UI
  version: v4

paths:
  /frontoffice/api/v4/ui/customization:
    get:
      tags:
        - UI Customization
      summary: Get current customization
      operationId: getUICustomization
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiGetUICustomization'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BBP.Platform.Http.ErrorData'

components:
  schemas:
    ApiGetUICustomization:
      type: object
      required:
        - projectName
        - defaultTheme
        - isLightEnabled
        - isDarkEnabled
        - light
        - dark
      properties:
        projectName:
          type: string
          description: Project name
          example: "MyProject"
        defaultTheme:
          type: string
          description: Default theme
          enum: ["LightTheme", "DarkTheme"]
          example: "LightTheme"
        isLightEnabled:
          type: boolean
        isDarkEnabled:
          type: boolean
        light:
          $ref: '#/components/schemas/ApiThemePalette'
        dark:
          $ref: '#/components/schemas/ApiThemePalette'
        files:
          $ref: '#/components/schemas/ApiFilePaths'

    ApiThemePalette:
      type: object
      required:
        - accent
        - accent-hover
        - background
        - card
        - demo
        - disabled
        - divider
        - field
        - medium
        - negative
        - overlay
        - positive
        - text-contrast
        - text-main
        - text-secondary
        - tooltip
      properties:
        accent:
          type: string
        accent-hover:
          type: string
        background:
          type: string
        card:
          type: string
        demo:
          type: string
        disabled:
          type: string
        divider:
          type: string
        field:
          type: string
        medium:
          type: string
        negative:
          type: string
        overlay:
          type: string
        positive:
          type: string
        text-contrast:
          type: string
        text-main:
          type: string
        text-secondary:
          type: string
        tooltip:
          type: string

    ApiFilePaths:
      type: object
      properties:
        FaviconIco:
          type: string
        FaviconSvg:
          type: string
        LogoDarkThemeShort:
          type: string
        LogoDarkTheme:
          type: string
        LogoLightThemeShort:
          type: string
        LogoLightTheme:
          type: string

    BBP.Platform.Http.ErrorData:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details:
          $ref: '#/components/schemas/BBP.Platform.Http.ErrorData.ErrorDetails'
      additionalProperties: false
    BBP.Platform.Http.ErrorData.ErrorDetails:
      type: object
      properties:
        source:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
        stackTrace:
          type: string
          nullable: true
      additionalProperties: false
