"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[50463],{72816:function(e,t,n){n.r(t),n.d(t,{default:function(){return o}});var i=n(8566),a=(n(77157),n(10353),n(89100));function o(e){e.querySelector("form").addEventListener("submit",(function(e){i.Ay.show();var t=this;return ApiClient.getServerConfiguration().then((function(e){e.EnableFolderView=t.querySelector(".chkFolderView").checked,e.EnableGroupingIntoCollections=t.querySelector(".chkGroupMoviesIntoCollections").checked,e.DisplaySpecialsWithinSeasons=t.querySelector(".chkDisplaySpecialsWithinSeasons").checked,e.EnableExternalContentInSuggestions=t.querySelector(".chkExternalContentInSuggestions").checked,e.SaveMetadataHidden=t.querySelector("#chkSaveMetadataHidden").checked,ApiClient.updateServerConfiguration(e).then(a.default.processServerConfigurationUpdateResult)})),ApiClient.getNamedConfiguration("metadata").then((function(e){e.UseFileCreationTimeForDateAdded="1"===$("#selectDateAdded",t).val(),ApiClient.updateNamedConfiguration("metadata",e)})),e.preventDefault(),i.Ay.hide(),!1})),e.addEventListener("viewshow",(function(){ApiClient.getServerConfiguration().then((function(t){e.querySelector(".chkFolderView").checked=t.EnableFolderView,e.querySelector(".chkGroupMoviesIntoCollections").checked=t.EnableGroupingIntoCollections,e.querySelector(".chkDisplaySpecialsWithinSeasons").checked=t.DisplaySpecialsWithinSeasons,e.querySelector(".chkExternalContentInSuggestions").checked=t.EnableExternalContentInSuggestions,e.querySelector("#chkSaveMetadataHidden").checked=t.SaveMetadataHidden})),ApiClient.getNamedConfiguration("metadata").then((function(t){e.querySelector("#selectDateAdded").selectedIndex=t.UseFileCreationTimeForDateAdded?1:0})),ApiClient.getSystemInfo().then((function(t){"Windows"===t.OperatingSystem?e.querySelector(".fldSaveMetadataHidden").classList.remove("hide"):e.querySelector(".fldSaveMetadataHidden").classList.add("hide")}))}))}}}]);