<div class="mt-3">
    <h2>{{ islandIndex }} - {{ server.islands[island.name].customDisplayName() }}
        <button class="btn btn-primary btn-sm" [routerLink]="['/config', 'server', cellIndex]">Back to Cell</button>
    </h2>
    <p>{{ island.islandWidth }} by {{ island.islandHeight }}</p>
    <ngb-accordion>
        <ngb-panel title="General Settings">
            <ng-template ngbPanelContent>
                <app-number id="worldX" label="World X" [(number)]="island.worldX"></app-number>
                <app-number id="worldY" label="World Y" [(number)]="island.worldY"></app-number>
                <app-number id="rotation" label="Rotation" [(number)]="island.rotation" step="0.000001" min="{{ minRot }}" max="{{ maxRot }}"></app-number>
                <app-number id="islandPoints" label="Island Points" [(number)]="island.islandPoints"></app-number>
                <app-number id="spawnPointRegionOverride" label="Spawn Override"
                            [(number)]="island.spawnPointRegionOverride" min="-1"
                            help="Default -1. Set to 0 or more to allow for this island to be spawned on. Must be a unique, consecutive number across the server"></app-number>
            </ng-template>
        </ngb-panel>
        <ngb-panel title="Treasure Settings">
            <ng-template ngbPanelContent>
                <app-number id="minTreasureQuality" label="Min Quality" [(number)]="island.minTreasureQuality"
                            help="Default -1. -1 means no limit"></app-number>
                <app-number id="maxTreasureQuality" label="Max Quality" [(number)]="island.maxTreasureQuality"
                            help="Default -1. -1 means no limit"></app-number>
                <app-checkbox id="useNpcVolumesForTreasures" label="Use NPC Volumes"
                              [(checkbox)]="island.useNpcVolumesForTreasures"
                              help="useNpcVolumesForTreasures"></app-checkbox>
                <app-checkbox id="useLevelBoundsForTreasures" label="Use Level Bounds"
                              [(checkbox)]="island.useLevelBoundsForTreasures"
                              help="useLevelBoundsForTreasures"></app-checkbox>
                <app-checkbox id="prioritizeVolumesForTreasures" label="Prioritise Volumes"
                              [(checkbox)]="island.prioritizeVolumesForTreasures"
                              help="prioritizeVolumesForTreasures"></app-checkbox>
                <app-number id="instanceTreasureQualityMultiplier" label="Quality Multiplier"
                            [(number)]="island.instanceTreasureQualityMultiplier" min="0" step="0.000001"
                            help="Default 1"></app-number>
                <app-number id="instanceTreasureQualityAddition" label="Quality Addition"
                            [(number)]="island.instanceTreasureQualityAddition" min="0" step="0.000001"
                            help="Default 0"></app-number>
            </ng-template>
        </ngb-panel>
        <ngb-panel title="Spawn Settings">
            <ng-template ngbPanelContent>
                <app-number id="finalNPCLevelMultiplier" label="Level Multiplier"
                            [(number)]="island.finalNPCLevelMultiplier" min="0" step="0.000001"
                            help="Default 1"></app-number>
                <app-number id="finalNPCLevelOffset" label="Level Addition"
                            [(number)]="island.finalNPCLevelOffset" min="0" step="0.000001"
                            help="Default 0"></app-number>
            </ng-template>
        </ngb-panel>
        <ngb-panel title="Single Player Settings">
            <ng-template ngbPanelContent>
                <app-number id="singleSpawnPointX" label="X" [(number)]="island.singleSpawnPointX"></app-number>
                <app-number id="singleSpawnPointY" label="Y" [(number)]="island.singleSpawnPointY"></app-number>
                <app-number id="singleSpawnPointZ" label="Z" [(number)]="island.singleSpawnPointZ"></app-number>
            </ng-template>
        </ngb-panel>
        <ngb-panel title="Treasure Locations">
            <ng-template ngbPanelContent>
                <div class="row" *ngFor="let treasurePos of island.treasureMapSpawnPoints; let i = index">
                    <div class="col-4">
                        <app-number id="{{ i }}-treasure-x" label="X" [(number)]="treasurePos.x"
                                    step="0.000001"></app-number>
                    </div>
                    <div class="col-4">
                        <app-number id="{{ i }}-treasure-y" label="Y" [(number)]="treasurePos.y"
                                    step="0.000001"></app-number>
                    </div>
                    <div class="col-4">
                        <app-number id="{{ i }}-treasure-z" label="Z" [(number)]="treasurePos.z" step="0.000001"
                                    postButtonText="-" (postButton)="removeTreasureLocation(i)"></app-number>
                    </div>
                </div>
            </ng-template>
        </ngb-panel>
        <ngb-panel title="Pirate Camp Locations">
            <ng-template ngbPanelContent>
                <div class="row" *ngFor="let campPos of island.wildPirateCampSpawnPoints; let i = index">
                    <div class="col-4">
                        <app-number id="{{ i }}-camp-x" label="X" [(number)]="campPos.x" step="0.000001"></app-number>
                    </div>
                    <div class="col-4">
                        <app-number id="{{ i }}-camp-y" label="Y" [(number)]="campPos.y" step="0.000001"></app-number>
                    </div>
                    <div class="col-4">
                        <app-number id="{{ i }}-camp-z" label="Z" [(number)]="campPos.z" step="0.000001"
                                    postButtonText="-" (postButton)="removeCampLocation(i)"></app-number>
                    </div>
                </div>
            </ng-template>
        </ngb-panel>
    </ngb-accordion>
</div>