define(["scripts/upfront/inline-panels/panel","scripts/upfront/inline-panels/collapsed-multi-control","scripts/upfront/inline-panels/tooltip-control"],function(e,t,n){var r=Upfront.mainData.l10n.image_element,i=e.extend({position_v:"none",position_h:"none",setWidth:function(e){var i=this.items._wrapped,s,o=_.extend({widthThreshold:100,width:101,heightThreshold:100,height:101},e);o.width<o.widthThreshold||o.height<o.heightThreshold?this.collapsed!==!0&&(s=new t,_.each(i,function(e){e instanceof n&&e.setDisabled(!0),s.sub_items[e.icon]=e}),s.icon="collapsedControl",s.tooltip=r.ctrl.more_tools,s.position="left",this.items=_([s]),this.collapsed=!0):(this.collapsed&&(this.items=_([]),_.each(i[0].sub_items,function(e,t){t!=="collapsedControl"&&this.items.push(e),e instanceof n&&e.setDisabled(!1)},this)),this.collapsed=!1)},delegateEvents:function(){Backbone.View.prototype.delegateEvents.call(this,arguments),this.items.each(function(e){e.delegateEvents()})}});return i});