<commit_before>/**
 * Provides Form and input features.
 *
 * @module furnace
 * @submodule furnace-forms
 */
import Control from './abstract';
import Ember from 'ember';

import DS from 'ember-data';
import getName from 'furnace-forms/utils/get-name';
import ControlSupport from 'furnace-forms/mixins/controls/control-support';
import Proxy from 'furnace-forms/proxy';
/**
 * Panel control component proxy 
 * 
 * @class Panel
 * @namespace Furnace.Forms.Controls
 * @extends Furnace.Forms.Controls.Abstract
 * @protected
 */
export default Control.extend(ControlSupport,{
	_component : 'panel',
	
	'for' : null,
	
	modelName: Ember.computed.alias('_modelName'),
	
	init: function() {
//		if(this['for']===null) {
//			if(this.get('_panel.for.'+this._name)) {
//				this.reopen({
//					'for': Ember.computed.alias('_panel.for.'+this._name)
//				});
//			} else {
//				this.reopen({
//					'for': Ember.computed.alias('_panel.for')
//				});
//			}
//		}
		this._super();		
		if(this._panel && this.get('for')===this.get('_panel.for')) {
			this.set('_path',this.get('_panel._path'));
		}	
	},
	
	actions: {
		apply:function() {
			this._apply();
		},
		reset : function() {
			this._reset();
		},
	},
	
	setEnabled: function(enabled) {		
		if(enabled!==this._enabled) {
			this.set('_enabled',enabled);
		}
		this.setFlag('isEnabled',this._enabled && (!this._panel || (this.get('_panel.isEnabled') && this.get('_panel.hasPrerequisites')!==false)));
	},
	_panelEnabledObserver:Ember.observer('_panel.hasPrerequisites,_panel.isEnabled',function() {
		this.setEnabled(this._enabled);<commit_msg>Removed panel path resolution due to fix in abstract<commit_after>/**
 * Provides Form and input features.
 *
 * @module furnace
 * @submodule furnace-forms
 */
import Control from './abstract';
import Ember from 'ember';

import DS from 'ember-data';
import getName from 'furnace-forms/utils/get-name';
import ControlSupport from 'furnace-forms/mixins/controls/control-support';
import Proxy from 'furnace-forms/proxy';
/**
 * Panel control component proxy 
 * 
 * @class Panel
 * @namespace Furnace.Forms.Controls
 * @extends Furnace.Forms.Controls.Abstract
 * @protected
 */
export default Control.extend(ControlSupport,{
	_component : 'panel',
	
	'for' : null,
	
	modelName: Ember.computed.alias('_modelName'),
	
	init: function() {
//		if(this['for']===null) {
//			if(this.get('_panel.for.'+this._name)) {
//				this.reopen({
//					'for': Ember.computed.alias('_panel.for.'+this._name)
//				});
//			} else {
//				this.reopen({
//					'for': Ember.computed.alias('_panel.for')
//				});
//			}
//		}
		this._super();		
	},
	
	actions: {
		apply:function() {
			this._apply();
		},
		reset : function() {
			this._reset();
		},
	},
	
	setEnabled: function(enabled) {		
		if(enabled!==this._enabled) {
			this.set('_enabled',enabled);
		}
		this.setFlag('isEnabled',this._enabled && (!this._panel || (this.get('_panel.isEnabled') && this.get('_panel.hasPrerequisites')!==false)));
	},
	_panelEnabledObserver:Ember.observer('_panel.hasPrerequisites,_panel.isEnabled',function() {
		this.setEnabled(this._enabled);
{'fraction_non_alphanumeric': 0.18940609951845908, 'fraction_numerical': 0.0, 'mean_word_length': 3.8385093167701863, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1841384', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1072, 'n_words': 174}