/**
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
import"../app-scroll-effects-behavior.js";import{ElementWithBackground as e,registerEffect as t}from"../../helpers/helpers.js";t("resize-snapped-title",{setUp:function setUp(e){var t=this._getDOMRef("mainTitle"),i=this._getDOMRef("condensedTitle"),n=e.duration||"0.2s",s={};return i?t?(t.style.transitionProperty="opacity",t.style.transitionDuration=n,i.style.transitionProperty="opacity",i.style.transitionDuration=n,s.condensedTitle=i,s.title=t,void(this._fxResizeSnappedTitle=s)):(console.warn("Scroll effect `resize-snapped-title`: undefined `main-title`"),!1):(console.warn("Scroll effect `resize-snapped-title`: undefined `condensed-title`"),!1)},run:function run(e,t){var i=this._fxResizeSnappedTitle;e>0?(i.title.style.opacity=0,i.condensedTitle.style.opacity=1):(i.title.style.opacity=1,i.condensedTitle.style.opacity=0)},tearDown:function tearDown(){var e=this._fxResizeSnappedTitle;e.title.style.transition="",e.condensedTitle.style.transition="",delete this._fxResizeSnappedTitle}});