
registerType('info.appdoo-mac', (function () { function SearchBarDataProvider() {} var __super = setSupertypeFromDomain(SearchBarDataProvider, 'DataProvider', 'info.appdoo-mac');

	Object.defineProperty(SearchBarDataProvider.prototype, "actionType", {
	outlet: true, 
	enumerable: true, get:function () { return this._actionType; }, set:function (v) {if (!Object.hasOwnProperty(this, "_actionType")) Object.defineProperty(this, "_actionType", { writable: true, configurable: true }); this._actionType = v; }});
	

	Object.defineProperty(SearchBarDataProvider.prototype, "actionInfo", {
	outlet: true, 
	enumerable: true, 
		get: function () { return EditableObjectGetActionInfoProperty.call(this); }, 
		set: function (v) {if (!Object.hasOwnProperty(this, "_actionInfo")) Object.defineProperty(this, "_actionInfo", { writable: true, configurable: true }); EditableObjectSetActionInfoProperty.call(this, v); }});
	

	Object.defineProperty(SearchBarDataProvider.prototype, "propertiesForBindings", {
		value: ['text']});
	

	Object.defineProperty(SearchBarDataProvider.prototype, "searchBar", {
	outlet: true, 
		get: function () { return this.object; }, 
		set: function (v) {if (!Object.hasOwnProperty(this, "_searchBar")) Object.defineProperty(this, "_searchBar", { writable: true, configurable: true }); this.object = v; }});
	

	Object.defineProperty(SearchBarDataProvider.prototype, "searchBarID", {
	outlet: true, 
		get: function () { return this.objectID; }, 
		set: function (v) {if (!Object.hasOwnProperty(this, "_searchBarID")) Object.defineProperty(this, "_searchBarID", { writable: true, configurable: true }); this.objectID = v; }});
	

	Object.defineProperty(SearchBarDataProvider.prototype, "triggersActionOnInput", {
	outlet: true, 
	enumerable: true, get:function () { return this._triggersActionOnInput; }, set:function (v) {if (!Object.hasOwnProperty(this, "_triggersActionOnInput")) Object.defineProperty(this, "_triggersActionOnInput", { writable: true, configurable: true }); this._triggersActionOnInput = v; }});
	

SearchBarDataProvider.prototype.nameForKeyPath = function SearchBarDataProvider_nameForKeyPath(keyPath) {
		if (keyPath === 'contents.text') return LocalizedString('Text');};
	
	
SearchBarDataProvider.prototype.transformData = function SearchBarDataProvider_transformData(data, transformer) {
		if (transformer.isXIBGenerator) return this.sbdp_transformDataForXIB(data, transformer);
		return this.sbdp_transformDataForPreview(data, transformer);};
	
	

SearchBarDataProvider.prototype.sbdp_transformDataForXIB = function SearchBarDataProvider_sbdp_transformDataForXIB(data, transformer) {

		transformer.demandPlugin('info.appdoo-mac.TextFieldDelegate');

		var result = __super.prototype.transformData.call(this, data, transformer);


		transformer.connectOutletNamed__in__to__result__('viewController', data.$id, transformer.currentViewControllerId, result);

		transformer.connectOutletNamed__in__to__result__('searchBar', data.$id, data.objectID, result);

		transformer.transformAndAddActionToObject(null, data.actionInfo, result, data.$id, true);
		
		transformer.object__addUserDefinedRuntimeAttribute__(result, {
			type: 'boolean',
			keyPath: 'triggersActionOnInput',
			value: transformer.transformBoolean(data.triggersActionOnInput)
		});

		return result;};
	

SearchBarDataProvider.prototype.sbdp_transformDataForPreview = function SearchBarDataProvider_sbdp_transformDataForPreview(data, transformer) {

		var result = __super.prototype.transformData.call(this, data, transformer);
		result.viewController = { $type: '$CurrentViewController' };
		result.searchBar = { $type: '$Reference', destination: data.objectID };
		result.triggersActionOnInput = transformer.transformBoolean(data.triggersActionOnInput);

		if (data.actionInfo) {
			result.$initialMethodCalls.push({
				name: 'addTarget:action:forEvents:',
				arguments: [
					transformer.generateActionObject(null, data.actionInfo),
					{ $type: 'SEL', name: 'action:' },
					"search"
				]
			});
		}

		return result;};
	

	Object.defineProperty(SearchBarDataProvider.prototype, "isPlugin", {
		value: true});
	

SearchBarDataProvider.prototype.initPropertiesFromData = function SearchBarDataProvider_initPropertiesFromData(data) {
try { __super.prototype.initPropertiesFromData.call(this, data); } catch (err) {}
if (data.hasOwnProperty("actionType")) this.actionType = data.actionType;
if (data.hasOwnProperty("actionInfo")) this.actionInfo = data.actionInfo;
if (data.hasOwnProperty("searchBar")) this.searchBar = data.searchBar;
if (data.hasOwnProperty("searchBarID")) this.searchBarID = data.searchBarID;
if (data.hasOwnProperty("triggersActionOnInput")) this.triggersActionOnInput = data.triggersActionOnInput;
};

SearchBarDataProvider.prototype.decodeData = function SearchBarDataProvider_decodeData(data) { var decoded;
try { decoded = __super.prototype.decodeData.call(this, data); } catch (err) { console.warn(err); decoded = clone(data); }
if (data.hasOwnProperty("actionInfo")) decoded.actionInfo = this.context.decodeObjectTree(data.actionInfo);
if (data.hasOwnProperty("searchBar")) decoded.searchBar = this.context.decodeObjectTree(data.searchBar);
return decoded; };

SearchBarDataProvider.prototype.encode = function SearchBarDataProvider_encode() { var encoded;
try { encoded = __super.prototype.encode.call(this); } catch (err) { console.warn(err); encoded = this.context.encodeObject(this); }
if (this._actionInfo && this._actionInfo.encode) {encoded.actionInfo = this.actionInfo.encode();
}return encoded; };

SearchBarDataProvider.prototype.encodeCloned = function SearchBarDataProvider_encodeCloned() { var encoded;
try { encoded = __super.prototype.encodeCloned.call(this); } catch (err) { console.warn(err); encoded = {}; }
if (this._actionInfo && this._actionInfo.encode) {encoded.actionInfo = this.actionInfo.encodeCloned();
}return encoded; };

SearchBarDataProvider.prototype.expectedTypeForProperty = function SearchBarDataProvider_expectedTypeForProperty(key) {
	if (key === "actionType") return "String";
	if (key === "actionInfo") return "ActionInfo";
	if (key === "propertiesForBindings") return "";
	if (key === "searchBar") return "UISearchBar";
	if (key === "searchBarID") return "String";
	if (key === "triggersActionOnInput") return "Boolean";
	if (key === "isPlugin") return "";
	if (__super) return __super.prototype.expectedTypeForProperty(key);
};

return SearchBarDataProvider; }()));