${this.isSignInState_(HistorySignInState.SIGNED_OUT)||this.isSignInState_(HistorySignInState.WEB_ONLY_SIGNED_IN)?html`
$i18n{turnOnSyncHistoryPromo}
$i18n{syncHistoryPromoBodySignedOut}
`:""}
${this.isSignInState_(HistorySignInState.WEB_ONLY_SIGNED_IN)&&this.accountInfo_?html`
${this.accountInfo_.name}
${this.accountInfo_.email}
`:""}
${this.isSignInState_(HistorySignInState.SIGN_IN_PENDING)&&this.accountInfo_?html`
$i18n{turnOnSyncHistoryPromo}
${!this.isTabsSyncTurnedOn_()?html`
$i18n{syncHistoryPromoBodyPendingSignIn}
`:""}
${this.isTabsSyncTurnedOn_()?html`
$i18n{syncHistoryPromoBodyPendingSignInSyncHistoryOn}
`:""}
`:""}
${this.isSignInState_(HistorySignInState.SIGNED_IN)&&!this.isTabsSyncTurnedOn_()&&this.accountInfo_?html`
$i18n{turnOnSyncHistoryPromo}
$i18n{turnOnSignedInSyncHistoryPromoBodySignInSyncOff}
`:""}
${this.isSignInState_(HistorySignInState.SIGN_IN_PENDING)&&this.isTabsSyncTurnedOn_()?html`
$i18n{verifyItsYou}
`:html`
$i18n{turnOnSyncHistoryButton}
`}
`:""}
`}const HistorySyncedDeviceManagerElementBase=WebUiListenerMixinLit(CrLitElement);class HistorySyncedDeviceManagerElement extends HistorySyncedDeviceManagerElementBase{static get is(){return"history-synced-device-manager"}static get styles(){return getCss$2()}render(){return getHtml$2.bind(this)()}static get properties(){return{sessionList:{type:Array},searchTerm:{type:String},syncedDevices_:{type:Array},historyIdentityState_:{type:Object},guestSession_:{type:Boolean},signInAllowed_:{type:Boolean},fetchingSyncedTabs_:{type:Boolean},hasSeenForeignData_:{type:Boolean},actionMenuModel_:{type:String},replaceSyncPromosWithSignInPromos_:{type:Boolean},accountInfo_:{type:Object}}}focusGrid_=null;focusGridUpdateTimeout_=null;#syncedDevices__accessor_storage=[];get syncedDevices_(){return this.#syncedDevices__accessor_storage}set syncedDevices_(value){this.#syncedDevices__accessor_storage=value}#hasSeenForeignData__accessor_storage=false;get hasSeenForeignData_(){return this.#hasSeenForeignData__accessor_storage}set hasSeenForeignData_(value){this.#hasSeenForeignData__accessor_storage=value}#fetchingSyncedTabs__accessor_storage=false;get fetchingSyncedTabs_(){return this.#fetchingSyncedTabs__accessor_storage}set fetchingSyncedTabs_(value){this.#fetchingSyncedTabs__accessor_storage=value}#actionMenuModel__accessor_storage=null;get actionMenuModel_(){return this.#actionMenuModel__accessor_storage}set actionMenuModel_(value){this.#actionMenuModel__accessor_storage=value}#guestSession__accessor_storage=loadTimeData.getBoolean("isGuestSession");get guestSession_(){return this.#guestSession__accessor_storage}set guestSession_(value){this.#guestSession__accessor_storage=value}#signInAllowed__accessor_storage=loadTimeData.getBoolean("isSignInAllowed");get signInAllowed_(){return this.#signInAllowed__accessor_storage}set signInAllowed_(value){this.#signInAllowed__accessor_storage=value}#replaceSyncPromosWithSignInPromos__accessor_storage=loadTimeData.getBoolean("replaceSyncPromosWithSignInPromos");get replaceSyncPromosWithSignInPromos_(){return this.#replaceSyncPromosWithSignInPromos__accessor_storage}set replaceSyncPromosWithSignInPromos_(value){this.#replaceSyncPromosWithSignInPromos__accessor_storage=value}signinPausedImpressionRecorded_=false;#accountInfo__accessor_storage=null;get accountInfo_(){return this.#accountInfo__accessor_storage}set accountInfo_(value){this.#accountInfo__accessor_storage=value}onAccountInfoDataReceivedListenerId_=null;#historyIdentityState__accessor_storage={signIn:HistorySignInState.SIGNED_OUT,tabsSync:SyncState.TURNED_OFF,historySync:SyncState.TURNED_OFF};get historyIdentityState_(){return this.#historyIdentityState__accessor_storage}set historyIdentityState_(value){this.#historyIdentityState__accessor_storage=value}#searchTerm_accessor_storage="";get searchTerm(){return this.#searchTerm_accessor_storage}set searchTerm(value){this.#searchTerm_accessor_storage=value}#sessionList_accessor_storage=null;get sessionList(){return this.#sessionList_accessor_storage}set sessionList(value){this.#sessionList_accessor_storage=value}connectedCallback(){super.connectedCallback();this.focusGrid_=new FocusGrid;BrowserProxyImpl.getInstance().otherDevicesInitialized();BrowserProxyImpl.getInstance().recordHistogram(SYNCED_TABS_HISTOGRAM_NAME,SyncedTabsHistogram.INITIALIZED,SyncedTabsHistogram.LIMIT);BrowserProxyImpl.getInstance().getInitialIdentityState().then((identityState=>{this.historyIdentityState_=identityState}));this.addWebUiListener("history-identity-state-changed",(identityState=>this.historyIdentityState_=identityState));this.onAccountInfoDataReceivedListenerId_=BrowserProxyImpl.getInstance().callbackRouter.sendAccountInfo.addListener(this.handleAccountInfoChanged_.bind(this));BrowserProxyImpl.getInstance().handler.requestAccountInfo().then((({accountInfo:accountInfo})=>this.handleAccountInfoChanged_(accountInfo)))}disconnectedCallback(){super.disconnectedCallback();this.focusGrid_.destroy();if(this.onAccountInfoDataReceivedListenerId_!==null){BrowserProxyImpl.getInstance().callbackRouter.removeListener(this.onAccountInfoDataReceivedListenerId_);this.onAccountInfoDataReceivedListenerId_=null}}willUpdate(changedProperties){super.willUpdate(changedProperties);const changedPrivateProperties=changedProperties;if(changedProperties.has("sessionList")){this.updateSyncedDevices_()}if(changedProperties.has("searchTerm")){this.searchTermChanged_()}if(changedPrivateProperties.has("historyIdentityState_")){this.onIdentityStateChanged_(changedPrivateProperties.get("historyIdentityState_")||null)}}firstUpdated(){this.addEventListener("synced-device-card-open-menu",this.onOpenMenu_);this.addEventListener("update-focus-grid",this.updateFocusGrid_)}configureSignInForTest(data){this.signInAllowed_=data.signInAllowed;this.guestSession_=data.guestSession}createInternalDevice_(session){let tabs=[];const separatorIndexes=[];for(let i=0;i