{
  "name": "FountainheadState",
  "shortname": "FountainheadState",
  "classitems": [
    {
      "file": "addon/components/fountainhead-state.js",
      "line": 73,
      "description": "<p>Actions hash</p>\n",
      "itemtype": "property",
      "name": "actions",
      "type": "{Object}",
      "class": "FountainheadState",
      "srcFileId": "addon_components_fountainhead-state.js"
    },
    {
      "file": "addon/components/fountainhead-state.js",
      "line": 52,
      "description": "<p>Boolean state tracking property. Use this to handle show/hide status.\n{{if state 'state' 'no-state'}}\n{{#fountainhead-button click=stateActions.toggleState}}Click{{/fountainhead-button}}</p>\n",
      "itemtype": "property",
      "name": "active",
      "type": "{Boolean}",
      "class": "FountainheadState",
      "srcFileId": "addon_components_fountainhead-state.js"
    },
    {
      "file": "addon/components/fountainhead-state.js",
      "line": 79,
      "description": "<p>Sets the {{c-l 'active'}} property to false.</p>\n",
      "itemtype": "method",
      "name": "closeModal",
      "class": "FountainheadState",
      "srcFileId": "addon_components_fountainhead-state.js"
    },
    {
      "file": "addon/components/fountainhead-state.js",
      "line": 86,
      "description": "<p>Sets the {{c-l 'active'}} property to true.</p>\n",
      "itemtype": "method",
      "name": "openModal",
      "class": "FountainheadState",
      "srcFileId": "addon_components_fountainhead-state.js"
    },
    {
      "file": "addon/components/fountainhead-state.js",
      "line": 60,
      "description": "<p>Rad State is a purely functional component with no rendered output of its\nown, so it doesn't need a root element cluttering up the DOM when it's\nbeing used.\n{{if state 'state' 'no-state'}}\n{{#fountainhead-button click=stateActions.toggleState}}Click{{/fountainhead-button}}</p>\n",
      "itemtype": "property",
      "name": "tagName",
      "type": "{string}",
      "class": "FountainheadState",
      "srcFileId": "addon_components_fountainhead-state.js"
    },
    {
      "file": "addon/components/fountainhead-state.js",
      "line": 93,
      "description": "<p>Sets the {{c-l 'active'}} property to passed state.</p>\n",
      "itemtype": "method",
      "name": "toggleState",
      "params": [
        {
          "name": "state",
          "description": "<p>State to set active to</p>\n",
          "type": "Boolean"
        }
      ],
      "class": "FountainheadState",
      "srcFileId": "addon_components_fountainhead-state.js"
    }
  ],
  "plugins": [],
  "extensions": [],
  "plugin_for": [],
  "extension_for": [],
  "module": "Addon",
  "file": "addon/components/fountainhead-state.js",
  "line": 4,
  "description": "{{#fountainhead-header tagName=\"h2\" elementId=\"ember-radical-`rad-state`-component\"}}Ember-Radical <code>rad-state</code> Component{{/fountainhead-header}}\n<p>Component that can be used for tracking state changes with modals or drawers.\nWrap either in one of these and use the yielded state and actions to handle\nshowing/hiding/controlling your component.</p>\n<p>Useful mainly for demonstration/documentation purposes, but also handy for\nwhen you don't have a convenient place to store state (particularly during\nearly development stages). It's also kind of nice for not cluttering up your\nparent scope with a bunch of extra state and actions you might not want to\nhang onto. Go nuts!</p>\n{{#fountainhead-header tagName=\"h2\" elementId=\"usage\"}}Usage{{/fountainhead-header}}\n<p>Instances of <code>rad-state</code> yield an <code>active</code> property and a hash of <code>actions</code>\nfor manipulating that state: <code>open</code>, <code>close</code>, and <code>toggleState</code>.</p>\n<pre class=\"language-handlebars\"><code class=\"language-handlebars\"><span class=\"token punctuation\">{</span><span class=\"token punctuation\">{</span>#rad<span class=\"token operator\">-</span>state <span class=\"token keyword\">as</span> <span class=\"token operator\">|</span>state stateActions<span class=\"token operator\">|</span><span class=\"token punctuation\">}</span><span class=\"token punctuation\">}</span>\n  <span class=\"token punctuation\">{</span><span class=\"token punctuation\">{</span>bank<span class=\"token operator\">-</span>vault\n    isOpen<span class=\"token operator\">=</span>state\n    closeVault<span class=\"token operator\">=</span>stateActions<span class=\"token punctuation\">.</span>close\n    openVault<span class=\"token operator\">=</span>stateActions<span class=\"token punctuation\">.</span>open<span class=\"token punctuation\">}</span><span class=\"token punctuation\">}</span>\n<span class=\"token punctuation\">{</span><span class=\"token punctuation\">{</span><span class=\"token operator\">/</span>rad<span class=\"token operator\">-</span>state<span class=\"token punctuation\">}</span><span class=\"token punctuation\">}</span>\n</code></pre>\n<p>Or for a smipler toggling implementation:</p>\n<pre class=\"language-handlebars\"><code class=\"language-handlebars\"><span class=\"token punctuation\">{</span><span class=\"token punctuation\">{</span>#rad<span class=\"token operator\">-</span>state <span class=\"token keyword\">as</span> <span class=\"token operator\">|</span>switchState switchActions<span class=\"token operator\">|</span><span class=\"token punctuation\">}</span><span class=\"token punctuation\">}</span>\n  <span class=\"token punctuation\">{</span><span class=\"token punctuation\">{</span>light<span class=\"token operator\">-</span><span class=\"token keyword\">switch</span> isOn<span class=\"token operator\">=</span>switchState toggleSwitch<span class=\"token operator\">=</span>switchActions<span class=\"token punctuation\">.</span>toggleState<span class=\"token punctuation\">}</span><span class=\"token punctuation\">}</span>\n<span class=\"token punctuation\">{</span><span class=\"token punctuation\">{</span><span class=\"token operator\">/</span>rad<span class=\"token operator\">-</span>state<span class=\"token punctuation\">}</span><span class=\"token punctuation\">}</span>\n</code></pre>\n<p>The actions in the actions hash have already been yielded via the action\nhelper, so it is not necessary to continue using that helper when passing\nactions into child components as properties (but you totally still can if\nyou would prefer to.</p>\n",
  "is_constructor": 1,
  "extends": "EmberRadical.RadState",
  "method": [
    {
      "file": "addon/components/fountainhead-state.js",
      "line": 79,
      "description": "<p>Sets the {{c-l 'active'}} property to false.</p>\n",
      "itemtype": "method",
      "name": "closeModal",
      "class": "FountainheadState",
      "srcFileId": "addon_components_fountainhead-state.js"
    },
    {
      "file": "addon/components/fountainhead-state.js",
      "line": 86,
      "description": "<p>Sets the {{c-l 'active'}} property to true.</p>\n",
      "itemtype": "method",
      "name": "openModal",
      "class": "FountainheadState",
      "srcFileId": "addon_components_fountainhead-state.js"
    },
    {
      "file": "addon/components/fountainhead-state.js",
      "line": 93,
      "description": "<p>Sets the {{c-l 'active'}} property to passed state.</p>\n",
      "itemtype": "method",
      "name": "toggleState",
      "params": [
        {
          "name": "state",
          "description": "<p>State to set active to</p>\n",
          "type": "Boolean"
        }
      ],
      "class": "FountainheadState",
      "srcFileId": "addon_components_fountainhead-state.js"
    }
  ],
  "property": [
    {
      "file": "addon/components/fountainhead-state.js",
      "line": 73,
      "description": "<p>Actions hash</p>\n",
      "itemtype": "property",
      "name": "actions",
      "type": "{Object}",
      "class": "FountainheadState",
      "srcFileId": "addon_components_fountainhead-state.js"
    },
    {
      "file": "addon/components/fountainhead-state.js",
      "line": 52,
      "description": "<p>Boolean state tracking property. Use this to handle show/hide status.\n{{if state 'state' 'no-state'}}\n{{#fountainhead-button click=stateActions.toggleState}}Click{{/fountainhead-button}}</p>\n",
      "itemtype": "property",
      "name": "active",
      "type": "{Boolean}",
      "class": "FountainheadState",
      "srcFileId": "addon_components_fountainhead-state.js"
    },
    {
      "file": "addon/components/fountainhead-state.js",
      "line": 60,
      "description": "<p>Rad State is a purely functional component with no rendered output of its\nown, so it doesn't need a root element cluttering up the DOM when it's\nbeing used.\n{{if state 'state' 'no-state'}}\n{{#fountainhead-button click=stateActions.toggleState}}Click{{/fountainhead-button}}</p>\n",
      "itemtype": "property",
      "name": "tagName",
      "type": "{string}",
      "class": "FountainheadState",
      "srcFileId": "addon_components_fountainhead-state.js"
    }
  ],
  "event": [],
  "srcFileId": "addon_components_fountainhead-state.js"
}