<commit_before>import Ember from 'ember';
import Panel from 'furnace-forms/controls/panel';
import getControl from 'furnace-forms/utils/get-control';
import Control from  'furnace-forms/controls/abstract';
import ControlSupport from 'furnace-forms/mixins/controls/control-support';

import Conditions from 'furnace-forms/utils/conditions';
import Options from 'furnace-forms/utils/options';
import Item from 'furnace-forms/utils/item';

function getMeta(options) {
	options._mixin={};
	return {
		type: 'form-control',
		options:options
	};
};


function computedControl(type,options) {
	options=options || {};
	options._controlType=type;
	var meta=getMeta(options);
	var control = Ember.computed(function(key,value,oldValue) {
		Ember.assert("You have assigned a control with key "+key+" to "+this.toString()+" but it has no control-support like a Panel, Form or Option",ControlSupport.detect(this));
		if(!this.__controls) {
			this.__controls={};
		}
		if(!this.__controls[key]) {<commit_msg>Fixed infinite recursion with computed controls<commit_after>import Ember from 'ember';
import Panel from 'furnace-forms/controls/panel';
import getControl from 'furnace-forms/utils/get-control';
import Control from  'furnace-forms/controls/abstract';
import ControlSupport from 'furnace-forms/mixins/controls/control-support';

import Conditions from 'furnace-forms/utils/conditions';
import Options from 'furnace-forms/utils/options';
import Item from 'furnace-forms/utils/item';

function getMeta(options) {
	options._mixin={};
	return {
		type: 'form-control',
		options:options
	};
};


function computedControl(type,options) {
	options=options || {};
	options._controlType=type;
	var meta=getMeta(options);
	var control = Ember.computed(function(key,value,oldValue) {
		Ember.assert("You have assigned a control with key "+key+" to "+this.toString()+" but it has no control-support like a Panel, Form or Option",ControlSupport.detect(this));
		if(!this.__controls) {
			this.__controls={};
		}

		if(!this.__controls[key]) {
			if(this.__controls[key]===null) {
				return null;
			}
			this.__controls[key]=null;
{'fraction_non_alphanumeric': 0.13623462630085148, 'fraction_numerical': 0.0, 'mean_word_length': 5.650943396226415, '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': '3358362', 'n_tokens_mistral': 679, 'n_tokens_neox': 647, 'n_words': 153}