let setsItemHeight = 23;

markup.push({
	"SetItemView": {
		nsClass: "Farrago.IBTileSetView",
		"selectable": true,
		"multipleSelection" : true,
		"drawsSelected": true,
		gxDraggable: true,
		gxDraggingRequiresFocus: false,
		gxDragController: {
			nsClass: "Farrago.IBSetListDragController",
			gxInsertionViewOffset: "0,-2",
			"gxInsertionView" : {
				nsClass: "GXDrawView",
				gxIntrinsicHeight: 3,
				gxIntrinsicWidth: -1, 
				"gxBackPainter" : {
					nsClass: "GXRoundRectPainter",
					gxCornerRadius: 1.5,
					gxFillColor: "name:secondary",
					gxEdgeInsets: "5,0,5,0",
				},
			},
		},
        gxDrawsFocused: true,
		axTitleKeyPath : "title",
		axIsIgnored: false,
        doubleClickAction: "startEditingTitle",
		gxCanDrawSubviewsIntoLayer: true,
        gxIntrinsicHeight: setsItemHeight,
        gxIntrinsicWidth: -1,
		gxBackPainter: {
			nsClass: "GXRoundRectPainter",
            gxEdgeInsets: "0,0,0,0",
			gxFillColor: "name:setsListBackground",
			
		},
		gxForePainter : {
			nsClass: "GXPainter",
			gxEdgeInsets: "0,0,0,0",
			"pressed" : {
				gxFillColor : "name:tertiary"
			},
			"dropAnimating" : {
				gxFillColor: "name:setsListBackground",
				gxAddStyles: ["selected", "focused"],
			}
		},
        gxLayout: [
            `V:[self(${setsItemHeight})]`,
            "H:|-8-[title]",        // width set in code
            "V:|-0-[title]-0-|",
             
			"V:[midiKey(15)]",
			"V:[hotKey(15)]",
			"H:[self]-(<=0)-[midiKey(26)]-5-[hotKey(26)]-3-|&alignCenterY",

             
			"V:[status(20)]",
			"H:[self]-(<=0)-[status(18)]&alignCenterY", // horizontal position set in code
        ],
		gxChildViews : {
			"title": {
                nsClass: "GXLabelView",
                gxIntrinsicWidth: -1,
                gxValueKeyPath : "title",
                gxDrawsFocused: true,
                gxIgnoreMouseClick: true,
                gxForePainter: {
                    "+": "LabelFore.left.size12",
                    gxFontColor: "name:setsListText",
                },
			},
            "status": {
                nsClass: "GXLabelView",
                gxValueKeyPath: "",
                gxDrawsFocused: true,
                gxShowOnKey : "showPlayingIcon",
                gxBackPainter: {
                    "+": "ImagePainter.playingIcon",
                    gxTintColor: "name:setsListText",
                },
            },
			"hotKey": {
				nsClass: "GXLabelView",
				gxAddViewBelow: true,
				gxValueKeyPath : "hotKey",
				gxDrawsFocused: true,
				gxIgnoreMouseClick: true,
				gxForePainter: {
					"+": "LabelFore.centerx.secondary.size12",
					gxFontColor: "name:setsListText",
				},
			},
			"midiKey": {
				nsClass: "GXLabelView",
				gxAddViewBelow: true,
				gxValueKeyPath: "midiResponder.midiNoteValue",
				gxShowOnKey: "midiResponder.hasMidi",
				gxDisableOnKey: "showMidiNoteDisabled",
				gxDrawsFocused: true,
				gxIgnoreMouseClick: true,
				gxForePainter: {
					"+": "LabelFore.centerx.secondary.size12",
					gxFontColor: "name:setsListText",
				},
				gxBackPainter: {
					nsClass : "GXRoundRectPainter",
					gxCornerRadius: 3,
					gxStrokeWidth: 0.5,
					gxFrameColor: "name:setsListText",
				},
			},
		},
	},

	// MARK: empty set with no tiles

    "EmptySetView": {
        nsClass: "GXDrawView",
        gxCanDrawSubviewsIntoLayer: true,
        gxIntrinsicWidth: -1,
        gxBackPainter: {
            nsClass: "GXPainter",
            gxFillColor: "name:boardBackground",
        },
        gxLayout: [
            "H:[superview]-(<=0)-[self(280)]&alignCenterY",
            "V:[superview]-(<=0)-[self(300)]&alignCenterX",
            "H:|-0-[image]-0-|",
            "V:|-4-[image(140)]-12-[heading]-10-[text(50)]",
            "H:|-0-[heading]-0-|",
            "H:|-8-[text]-0-|",
        ],
        gxChildViews : {
            "image": {
                nsClass: "GXDrawView",
                gxBackPainter: {
                    "+": "ImagePainter.emptySet",
                },
            },
            "heading": {
                nsClass: "GXLabelView",
                gxForePainter: "LabelFore.top.hiliteActive.bold.size15",
                gxDefaultValue: "No Sounds Yet",
            },
            "text": {
                nsClass: "GXLabelView",
                gxForePainter: "LabelFore.top.hiliteActive.size135",
                gxDefaultValue: "Drag them into this window,\n or click \"Add Sound\" in the toolbar.",
            },
        },
    }

});
