- type: entity
  id: ExtinguisherCabinet
  name: extinguisher cabinet
  description: A small wall mounted cabinet designed to hold a fire extinguisher.
  components:
    - type: WallMount
      arc: 360
    - type: Transform
      anchored: true
    - type: Clickable
    - type: InteractionOutline
    - type: Sprite
      sprite: Structures/Wallmounts/extinguisher_cabinet.rsi
      netsync: false
      layers:
      - state: frame
      - state: extinguisher
        map: ["enum.ItemCabinetVisualLayers.ContainsItem"]
        visible: true
      - state: closed
        map: ["enum.ItemCabinetVisualLayers.Door"]
    - type: ItemCabinet
      cabinetSlot:
        ejectOnInteract: true
        whitelist:
          components:
          - FireExtinguisher
      doorSound:
        path: /Audio/Machines/machine_switch.ogg
    - type: Appearance
    - type: ItemCabinetVisuals
      openState: open
      closedState: closed
  placement:
    mode: SnapgridCenter

- type: entity
  id: ExtinguisherCabinetOpen
  parent: ExtinguisherCabinet
  suffix: Open
  components:
  - type: ItemCabinet
    opened: true

- type: entity
  id: ExtinguisherCabinetFilled
  parent: ExtinguisherCabinet
  suffix: Filled
  components:
  - type: ItemCabinet
    cabinetSlot:
      ejectOnInteract: true
      startingItem: FireExtinguisher
      whitelist:
        components:
        - FireExtinguisher

- type: entity
  id: ExtinguisherCabinetFilledOpen
  parent: ExtinguisherCabinetFilled
  suffix: Filled, Open
  components:
  - type: ItemCabinet
    opened: true
