define(["require","exports","tslib","react","spectrum/tooltip","file-viewer/titlebar/truncate"],(function(e,t,r,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i=r.__importStar(i);var a="_4AgvgbtwUm",s="_3AOssxTAhv",c=(function(e){function t(){var t=e.apply(this,arguments)||this;return t.truncateTextEl=null,t.textRef=function(e){return t.truncateTextEl=e},t.state={truncatedFileName:""},t}return r.__extends(t,e),t.prototype.recalcText=function(e,t){var r=this;return o.recalcText(e,t,(function(e){return o.measureRenderedTextLen(e,r.truncateTextEl)}))},t.prototype.componentDidMount=function(){this.setState({truncatedFileName:this.recalcText(this.props.fileName,this.props.width)})},t.prototype.componentWillReceiveProps=function(e){this.props.fileName===e.fileName&&this.props.width===e.width||this.setState({truncatedFileName:this.recalcText(e.fileName,e.width)})},t.prototype.render=function(){var e=this.props.filePath;return i.createElement("div",{className:a},i.createElement("svg",{className:s},i.createElement("text",{x:0,y:50,ref:this.textRef})),i.createElement(n.Tooltip,{positionOffset:8,positioning:"below",tooltipContent:e},i.createElement("h1",null,this.state.truncatedFileName)))},t})(i.PureComponent);t.TruncatedTitle=c})); //# sourceMappingURL=truncated_title.min.js-vfl4XCd2s.map