local ElvUI_EltreumUI, E, L, V, P, G = unpack(select(2, ...))
local unpack = unpack

-- Dynamic Cam profile setup
function ElvUI_EltreumUI:GetDynamicCamProfile()
	if ElvUI_EltreumUI.Retail then
		DynamicCamDB = {
			["profileKeys"] = {
				[E.mynameRealm] = "Eltreum",
			},
			["profiles"] = {
				["Eltreum"] = {
					["defaultCvars"] = {
						["test_cameraDynamicPitchBaseFovPad"] = 0.7000000000000001,
						["test_cameraDynamicPitch"] = 1,
						["test_cameraDynamicPitchBaseFovPadDownScale"] = 1,
						["test_cameraDynamicPitchSmartPivotCutoffDist"] = 0,
						["test_cameraDynamicPitchBaseFovPadFlying"] = 0.9500000000000001,
						["cameraZoomSpeed"] = 50,
					},
					["version"] = 2,
					["reactiveZoom"] = {
						["enabled"] = true,
						["maxZoomTime"] = 0.1,
						["addIncrements"] = 1.5,
						["addIncrementsAlways"] = 0,
						["incAddDifference"] = 2,
					},
					["firstRun"] = false,
					["situations"] = {
						["303"] = {
							["view"] = {
								["viewNumber"] = 2,
							},
							["rotation"] = {
								["enabled"] = true,
								["rotationSpeed"] = 3,
								["rotateBack"] = false,
							},
							["hideUI"] = {
								["enabled"] = true,
								["hideEntireUI"] = true,
								["fadeOpacity"] = 0,
							},
						},
						["033"] = {
							["enabled"] = false,
						},
						["023"] = {
							["enabled"] = false,
						},
						["006"] = {
							["enabled"] = false,
						},
						["302"] = {
							["enabled"] = false,
						},
						["034"] = {
							["enabled"] = false,
						},
						["002"] = {
							["situationSettings"] = {
								["cvars"] = {
									["test_cameraOverShoulder"] = 0,
								},
							},
							["cameraActions"] = {
								["timeIsMax"] = false,
								["zoomMax"] = 20,
								["transitionTime"] = 1.05,
								["zoomMin"] = 20,
								["zoomSetting"] = "in",
								["zoomValue"] = 15,
							},
							["viewZoom"] = {
								["enabled"] = true,
								["zoomTransitionTime"] = 1.05,
								["zoomType"] = "in",
								["zoomValue"] = 15,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
							},
						},
						["101"] = {
							["rotation"] = {
								["enabled"] = true,
								["rotationTime"] = 0.5,
								["rotateBackTime"] = 0.5,
								["rotateBack"] = false,
							},
							["cameraActions"] = {
								["transitionTime"] = 0.5,
								["rotateSpeed"] = 10,
								["zoomValue"] = 3,
								["rotate"] = true,
								["timeIsMax"] = false,
							},
							["view"] = {
								["restoreView"] = true,
								["viewNumber"] = 2,
							},
						},
						["100"] = {
							["enabled"] = false,
							["cameraActions"] = {
								["zoomSetting"] = "out",
								["zoomValue"] = 30,
							},
							["cameraCVars"] = {
								["test_cameraDynamicPitch"] = 0,
								["test_cameraTargetFocusInteractEnable"] = 0,
								["test_cameraTargetFocusEnemyEnable"] = 0,
							},
						},
						["102"] = {
							["enabled"] = false,
						},
						["050"] = {
							["situationSettings"] = {
								["cvars"] = {
									["test_cameraDynamicPitch"] = 0,
									["test_cameraOverShoulder"] = 0,
								},
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
								["test_cameraDynamicPitch"] = 0,
							},
						},
						["200"] = {
							["view"] = {
								["enabled"] = true,
								["viewNumber"] = 3,
								["restoreView"] = true,
							},
							["viewZoom"] = {
								["viewZoomType"] = "view",
								["enabled"] = true,
								["viewNumber"] = 3,
								["zoomValue"] = 4,
							},
							["rotation"] = {
								["enabled"] = true,
								["pitchDegrees"] = 15,
								["rotationType"] = "degrees",
								["rotationSpeed"] = 20,
								["yawDegrees"] = 270,
								["rotateBack"] = false,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
							},
							["executeOnInit"] = "this.spells = {\n  556,     -- Astral Recall\n  3561,    -- Teleport: Stormwind\n  3562,    -- Teleport: Ironforge\n  3563,    -- Teleport: Undercity\n  3565,    -- Teleport: Darnassus\n  3566,    -- Teleport: Thunder Bluff\n  3567,    -- Teleport: Orgrimmar\n  8690,    -- Hearthstone\n  32271,   -- Teleport: Exodar\n  32272,   -- Teleport: Silvermoon\n  33690,   -- Teleport: Shattrath\n  35715,   -- Teleport: Shattrath\n  49358,   -- Teleport: Stonard\n  49359,   -- Teleport: Theramore\n  49844,   -- Using Direbrew's Remote\n  50977,   -- Death Gate\n  53140,   -- Teleport: Dalaran - Northrend\n  54406,   -- Teleport: Dalaran\n  75136,   -- Ethereal Portal\n  88342,   -- Teleport: Tol Barad\n  88344,   -- Teleport: Tol Barad\n  94719,   -- The Innkeeper's Daughter\n  120145,  -- Ancient Teleport: Dalaran\n  132621,  -- Teleport: Vale of Eternal Blossoms\n  132627,  -- Teleport: Vale of Eternal Blossoms\n  136508,  -- Dark Portal\n  140295,  -- Kirin Tor Beacon\n  168487,  -- Home Away from Home\n  168499,  -- Home Away from Home\n  171253,  -- Garrison Hearthstone\n  176242,  -- Teleport: Warspear\n  176248,  -- Teleport: Stormshield\n  189838,  -- Teleport to Shipyard\n  192084,  -- Jump to Skyhold\n  192085,  -- Jump to Skyhold\n  193669,  -- Basic Dimensional Rifting\n  193753,  -- Dreamwalk\n  193759,  -- Teleport: Hall of the Guardian\n  196079,  -- Recall (to the sanctuary of Frostwolf Keep)\n  196080,  -- Recall (to the sanctuary of Dun Baldar)\n  216016,  -- Jump to Skyhold\n  222695,  -- Dalaran Hearthstone\n  223805,  -- Advanced Dimensional Rifting\n  224869,  -- Teleport: Dalaran - Broken Isles\n  225428,  -- Town Portal: Shala'nir\n  225434,  -- Town Portal: Sashj'tar\n  225435,  -- Town Portal: Kal'delar\n  225440,  -- Town Portal: Lian'tril\n  225436,  -- Town Portal: Faronaar\n  227334,  -- Flight Master's Whistle\n  231504,  -- [Tome of] Town Portal\n  231505,  -- [Scroll of] Town Portal\n  248906,  -- Vindicaar Teleport Beacon\n  262100,  -- Recall (to your Great Hall)\n  278244,  -- Greatfather Winter's Hearthstone\n  278559,  -- Headless Horseman's Hearthstone\n  281403,  -- Teleport: Boralus\n  281404,  -- Teleport: Dazar'alor\n  285362,  -- Lunar Elder's Hearthstone\n  285424,  -- Peddlefeet's Lovely Hearthstone\n  286031,  -- Noble Gardener's Hearthstone\n  286331,  -- Fire Eater's Hearthstone\n  286353,  -- Brewfest Reveler's Hearthstone\n  298068,  -- Holographic Digitalization Hearthstone\n  308742,  -- Eternal Traveler's Hearthstone\n  312372,  -- Return to Camp\n  326064,  -- Night Fae Hearthstone\n  335671,  -- Scroll of Teleport: Theater of Pain\n  340200,  -- Necrolord Hearthstone\n  126892,  -- Zen Pilgrimage\n  340767,  -- Chromie's Teleportation Scroll  \n  344587,  -- Teleport: Oribos\n  \n}",
							["cameraActions"] = {
								["pitchDegrees"] = 15,
								["zoomSetting"] = "set",
								["transitionTime"] = 1,
								["rotateSpeed"] = 80,
								["zoomValue"] = 4,
								["yawDegrees"] = 270,
								["rotate"] = true,
								["timeIsMax"] = false,
								["rotateSetting"] = "degrees",
							},
							["situationSettings"] = {
								["cvars"] = {
									["test_cameraOverShoulder"] = 0,
								},
							},
						},
						["301"] = {
							["view"] = {
								["enabled"] = true,
								["viewNumber"] = 2,
								["restoreView"] = true,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 1,
								["test_cameraTargetFocusInteractStrengthPitch"] = 1,
								["test_cameraTargetFocusInteractEnable"] = 1,
							},
							["viewZoom"] = {
								["enabled"] = true,
								["viewZoomType"] = "view",
							},
							["cameraActions"] = {
								["zoomValue"] = 2,
								["timeIsMax"] = false,
							},
							["situationSettings"] = {
								["cvars"] = {
									["test_cameraOverShoulder"] = 1,
									["test_cameraTargetFocusInteractEnable"] = 1,
									["test_cameraTargetFocusInteractStrengthPitch"] = 1,
									["test_cameraTargetFocusInteractStrengthYaw"] = 1,
								},
							},
						},
						["060"] = {
							["situationSettings"] = {
								["cvars"] = {
									["test_cameraDynamicPitch"] = 0,
									["test_cameraOverShoulder"] = 0,
								},
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
								["test_cameraDynamicPitch"] = 0,
							},
						},
						["031"] = {
							["enabled"] = false,
						},
						["201"] = {
							["enabled"] = false,
						},
						["004"] = {
							["situationSettings"] = {
								["cvars"] = {
									["test_cameraOverShoulder"] = 0,
								},
							},
							["cameraActions"] = {
								["zoomSetting"] = "set",
								["timeIsMax"] = false,
								["transitionTime"] = 1.5,
								["zoomValue"] = 15,
							},
							["viewZoom"] = {
								["enabled"] = true,
								["zoomTransitionTime"] = 1.5,
								["zoomValue"] = 15,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
							},
						},
						["001"] = {
							["situationSettings"] = {
								["cvars"] = {
									["test_cameraOverShoulder"] = 0,
								},
							},
							["cameraActions"] = {
								["zoomSetting"] = "out",
								["timeIsMax"] = false,
								["transitionTime"] = 1.5,
								["zoomValue"] = 20,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
							},
							["viewZoom"] = {
								["enabled"] = true,
								["zoomTransitionTime"] = 1.5,
								["zoomType"] = "out",
								["zoomValue"] = 20,
							},
						},
						["024"] = {
							["enabled"] = false,
						},
						["051"] = {
							["enabled"] = false,
						},
						["061"] = {
							["enabled"] = false,
						},
						["300"] = {
							["view"] = {
								["enabled"] = true,
								["viewNumber"] = 2,
								["restoreView"] = true,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
								["test_cameraTargetFocusInteractStrengthPitch"] = 1,
								["test_cameraTargetFocusInteractEnable"] = 1,
							},
							["viewZoom"] = {
								["enabled"] = true,
								["viewZoomType"] = "view",
							},
							["cameraActions"] = {
								["zoomValue"] = 2,
								["timeIsMax"] = false,
							},
							["situationSettings"] = {
								["cvars"] = {
									["test_cameraOverShoulder"] = 0,
									["test_cameraTargetFocusInteractEnable"] = 1,
									["test_cameraTargetFocusInteractStrengthPitch"] = 1,
									["test_cameraTargetFocusInteractStrengthYaw"] = 1,
								},
							},
						},
						["020"] = {
							["situationSettings"] = {
								["cvars"] = {
									["test_cameraOverShoulder"] = 0,
									["test_cameraDynamicPitch"] = 0,
								},
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
								["test_cameraDynamicPitch"] = 0,
							},
						},
						["030"] = {
							["situationSettings"] = {
								["cvars"] = {
									["test_cameraDynamicPitch"] = 0,
									["test_cameraOverShoulder"] = 0,
								},
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
							},
						},
						["021"] = {
							["enabled"] = false,
						},
						["005"] = {
							["situationSettings"] = {
								["cvars"] = {
									["test_cameraOverShoulder"] = 0,
								},
							},
							["cameraActions"] = {
								["zoomValue"] = 20,
								["timeIsMax"] = false,
								["transitionTime"] = 1.5,
								["zoomSetting"] = "in",
							},
							["viewZoom"] = {
								["enabled"] = true,
								["zoomTransitionTime"] = 1.5,
								["zoomType"] = "in",
								["zoomValue"] = 14,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
							},
						},
					},
					["advanced"] = true,
				},
			},
		}
	elseif ElvUI_EltreumUI.TBC or ElvUI_EltreumUI.Classic then
		DynamicCamDB = {
			["profileKeys"] = {
				[E.mynameRealm] = "Eltreum",
			},
			["profiles"] = {
				["Eltreum"] = {
					["reactiveZoom"] = {
						["enabled"] = true,
						["maxZoomTime"] = 0.1,
						["addIncrements"] = 1.5,
						["addIncrementsAlways"] = 0,
						["incAddDifference"] = 2,
					},
					["advanced"] = true,
					["version"] = 2,
					["situations"] = {
						["303"] = {
						},
						["033"] = {
							["enabled"] = false,
						},
						["023"] = {
							["enabled"] = false,
						},
						["006"] = {
							["enabled"] = false,
						},
						["302"] = {
							["enabled"] = false,
						},
						["060"] = {
							["cameraCVars"] = {
								["test_cameraDynamicPitch"] = 0,
								["test_cameraOverShoulder"] = 0,
							},
						},
						["031"] = {
							["enabled"] = false,
						},
						["002"] = {
							["cameraActions"] = {
								["timeIsMax"] = false,
								["zoomSetting"] = "in",
								["transitionTime"] = 1.05,
								["zoomValue"] = 15,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
							},
						},
						["100"] = {
							["enabled"] = false,
						},
						["200"] = {
							["view"] = {
								["enabled"] = true,
								["viewNumber"] = 3,
								["restoreView"] = true,
							},
							["executeOnInit"] = "this.spells = {\n  556,     -- Astral Recall\n  3561,    -- Teleport: Stormwind\n  3562,    -- Teleport: Ironforge\n  3563,    -- Teleport: Undercity\n  3565,    -- Teleport: Darnassus\n  3566,    -- Teleport: Thunder Bluff\n  3567,    -- Teleport: Orgrimmar\n  8690,    -- Hearthstone\n  32271,   -- Teleport: Exodar\n  32272,   -- Teleport: Silvermoon\n  33690,   -- Teleport: Shattrath\n  35715,   -- Teleport: Shattrath\n  49358,   -- Teleport: Stonard\n  49359,   -- Teleport: Theramore\n  49844,   -- Using Direbrew's Remote\n  50977,   -- Death Gate\n  53140,   -- Teleport: Dalaran - Northrend\n  54406,   -- Teleport: Dalaran\n  75136,   -- Ethereal Portal\n  88342,   -- Teleport: Tol Barad\n  88344,   -- Teleport: Tol Barad\n  94719,   -- The Innkeeper's Daughter\n  120145,  -- Ancient Teleport: Dalaran\n  132621,  -- Teleport: Vale of Eternal Blossoms\n  132627,  -- Teleport: Vale of Eternal Blossoms\n  136508,  -- Dark Portal\n  140295,  -- Kirin Tor Beacon\n  168487,  -- Home Away from Home\n  168499,  -- Home Away from Home\n  171253,  -- Garrison Hearthstone\n  176242,  -- Teleport: Warspear\n  176248,  -- Teleport: Stormshield\n  189838,  -- Teleport to Shipyard\n  192084,  -- Jump to Skyhold\n  192085,  -- Jump to Skyhold\n  193669,  -- Basic Dimensional Rifting\n  193753,  -- Dreamwalk\n  193759,  -- Teleport: Hall of the Guardian\n  196079,  -- Recall (to the sanctuary of Frostwolf Keep)\n  196080,  -- Recall (to the sanctuary of Dun Baldar)\n  216016,  -- Jump to Skyhold\n  222695,  -- Dalaran Hearthstone\n  223805,  -- Advanced Dimensional Rifting\n  224869,  -- Teleport: Dalaran - Broken Isles\n  225428,  -- Town Portal: Shala'nir\n  225434,  -- Town Portal: Sashj'tar\n  225435,  -- Town Portal: Kal'delar\n  225440,  -- Town Portal: Lian'tril\n  225436,  -- Town Portal: Faronaar\n  227334,  -- Flight Master's Whistle\n  231504,  -- [Tome of] Town Portal\n  231505,  -- [Scroll of] Town Portal\n  248906,  -- Vindicaar Teleport Beacon\n  262100,  -- Recall (to your Great Hall)\n  278244,  -- Greatfather Winter's Hearthstone\n  278559,  -- Headless Horseman's Hearthstone\n  281403,  -- Teleport: Boralus\n  281404,  -- Teleport: Dazar'alor\n  285362,  -- Lunar Elder's Hearthstone\n  285424,  -- Peddlefeet's Lovely Hearthstone\n  286031,  -- Noble Gardener's Hearthstone\n  286331,  -- Fire Eater's Hearthstone\n  286353,  -- Brewfest Reveler's Hearthstone\n  298068,  -- Holographic Digitalization Hearthstone\n  308742,  -- Eternal Traveler's Hearthstone\n  312372,  -- Return to Camp\n  326064,  -- Night Fae Hearthstone\n  335671,  -- Scroll of Teleport: Theater of Pain\n  340200,  -- Necrolord Hearthstone\n  126892,  -- Zen Pilgrimage\n  340767,  -- Chromie's Teleportation Scroll  \n  344587,  -- Teleport: Oribos\n  \n}",
							["cameraActions"] = {
								["pitchDegrees"] = 15,
								["zoomSetting"] = "set",
								["transitionTime"] = 1,
								["zoomValue"] = 4,
								["yawDegrees"] = 270,
								["rotate"] = true,
								["rotateSetting"] = "degrees",
								["timeIsMax"] = false,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
							},
						},
						["102"] = {
							["enabled"] = false,
						},
						["050"] = {
							["cameraCVars"] = {
								["test_cameraDynamicPitch"] = 0,
								["test_cameraOverShoulder"] = 0,
							},
						},
						["021"] = {
							["enabled"] = false,
						},
						["301"] = {
							["cameraActions"] = {
								["timeIsMax"] = false,
							},
							["view"] = {
								["enabled"] = true,
								["viewNumber"] = 2,
								["restoreView"] = true,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 1,
								["test_cameraTargetFocusInteractEnable"] = 1,
								["test_cameraTargetFocusInteractStrengthPitch"] = 1,
								["test_cameraTargetFocusInteractStrengthYaw"] = 1,
							},
						},
						["005"] = {
							["cameraActions"] = {
								["timeIsMax"] = false,
								["zoomSetting"] = "in",
								["transitionTime"] = 1.5,
								["zoomValue"] = 14,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
							},
						},
						["101"] = {
							["cameraActions"] = {
								["transitionTime"] = 0.5,
								["rotateSpeed"] = 10,
								["rotate"] = true,
								["timeIsMax"] = false,
							},
						},
						["201"] = {
							["enabled"] = false,
						},
						["061"] = {
							["enabled"] = false,
						},
						["001"] = {
							["cameraActions"] = {
								["timeIsMax"] = false,
								["zoomSetting"] = "out",
								["transitionTime"] = 1.5,
								["zoomValue"] = 20,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
							},
						},
						["024"] = {
							["enabled"] = false,
						},
						["051"] = {
							["enabled"] = false,
						},
						["004"] = {
							["cameraActions"] = {
								["timeIsMax"] = false,
								["zoomSetting"] = "set",
								["transitionTime"] = 1.5,
								["zoomValue"] = 15,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
							},
						},
						["300"] = {
							["view"] = {
								["enabled"] = true,
								["viewNumber"] = 2,
								["restoreView"] = true,
							},
							["cameraActions"] = {
								["timeIsMax"] = false,
							},
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
								["test_cameraTargetFocusInteractEnable"] = 1,
								["test_cameraTargetFocusInteractStrengthPitch"] = 1,
								["test_cameraTargetFocusInteractStrengthYaw"] = 1,
							},
						},
						["020"] = {
							["cameraCVars"] = {
								["test_cameraOverShoulder"] = 0,
								["test_cameraDynamicPitch"] = 0,
							},
						},
						["030"] = {
							["cameraCVars"] = {
								["test_cameraDynamicPitch"] = 0,
								["test_cameraOverShoulder"] = 0,
							},
						},
						["034"] = {
							["enabled"] = false,
						},
						["custom1"] = {
							["enabled"] = false,
							["name"] = "narcissus",
						},
					},
					["defaultCvars"] = {
						["cameraZoomSpeed"] = 50,
						["test_cameraDynamicPitchBaseFovPadFlying"] = 0.95,
						["test_cameraDynamicPitchBaseFovPadDownScale"] = 1,
						["test_cameraDynamicPitchBaseFovPad"] = 0.7,
						["test_cameraDynamicPitch"] = 1,
						["test_cameraDynamicPitchSmartPivotCutoffDist"] = 0,
					},
					["firstRun"] = false,
				},
			},
		}
	end
	DynamicCam.db:SetProfile("Eltreum")
end
