// phpcs:ignoreFile
import{t as l,D as y,a as m,T as c}from"./twig-TIIEE6v_.js";import"./_commonjsHelpers-_d1bhYXs.js";document.addEventListener("DOMContentLoaded",()=>{function e(t){if(t.getAttribute("data-webform")==="true"||this.el)return;if(this.el=t,this.el.querySelectorAll(".ct-field-message--error").length>0){const i=document.querySelector(".ct-message--error");i&&(i.matches("a")||i.setAttribute("tabindex","-1"),i.focus(),i.scrollIntoView({behavior:"smooth"}))}this.el.setAttribute("data-webform","true")}document.querySelectorAll(".ct-webform").forEach(t=>{new e(t)})});m(c);c.cache(!1);const a=e=>e,g=(e={})=>{const t=l.twig({id:"/app/web/themes/contrib/civictheme/components/03-organisms/webform/webform.twig",data:[{type:"raw",value:`

`,position:{start:442,end:444}},{type:"logic",token:{type:"Twig.logic.type.set",key:"vertical_spacing_class",expression:[{type:"Twig.expression.type.variable",value:"vertical_spacing",match:["vertical_spacing"]},{type:"Twig.expression.type.array.start",value:"[",match:["["]},{type:"Twig.expression.type.string",value:"top"},{type:"Twig.expression.type.comma"},{type:"Twig.expression.type.string",value:"bottom"},{type:"Twig.expression.type.comma"},{type:"Twig.expression.type.string",value:"both"},{type:"Twig.expression.type.array.end",value:"]",match:["]"]},{type:"Twig.expression.type.operator.binary",value:"in",precidence:8,associativity:"leftToRight",operator:"in"},{type:"Twig.expression.type.string",value:"ct-vertical-spacing-inset--%s"},{type:"Twig.expression.type.filter",value:"format",match:["|format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"vertical_spacing",match:["vertical_spacing"]},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]},{type:"Twig.expression.type.string",value:""},{type:"Twig.expression.type.operator.binary",value:"?",precidence:16,associativity:"rightToLeft",operator:"?"}],position:{start:444,end:588}},position:{start:444,end:588}},{type:"logic",token:{type:"Twig.logic.type.set",key:"with_background_class",expression:[{type:"Twig.expression.type.variable",value:"with_background",match:["with_background"]},{type:"Twig.expression.type.string",value:"ct-webform--with-background"},{type:"Twig.expression.type.string",value:""},{type:"Twig.expression.type.operator.binary",value:"?",precidence:16,associativity:"rightToLeft",operator:"?"}],position:{start:589,end:675}},position:{start:589,end:675}},{type:"logic",token:{type:"Twig.logic.type.set",key:"theme_class",expression:[{type:"Twig.expression.type.string",value:"ct-theme-%s"},{type:"Twig.expression.type.filter",value:"format",match:["|format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"theme",match:["theme"]},{type:"Twig.expression.type.filter",value:"default",match:["|default","default"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"light"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}],position:{start:676,end:744}},position:{start:676,end:744}},{type:"logic",token:{type:"Twig.logic.type.set",key:"modifier_class",expression:[{type:"Twig.expression.type.string",value:"%s %s %s %s"},{type:"Twig.expression.type.filter",value:"format",match:["|format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"theme_class",match:["theme_class"]},{type:"Twig.expression.type.comma"},{type:"Twig.expression.type.variable",value:"vertical_spacing_class",match:["vertical_spacing_class"]},{type:"Twig.expression.type.comma"},{type:"Twig.expression.type.variable",value:"with_background_class",match:["with_background_class"]},{type:"Twig.expression.type.comma"},{type:"Twig.expression.type.variable",value:"modifier_class",match:["modifier_class"]},{type:"Twig.expression.type.filter",value:"default",match:["|default","default"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:""},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}],position:{start:745,end:880}},position:{start:745,end:880}},{type:"raw",value:"",position:{start:881,end:882}},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"referenced_webform",match:["referenced_webform"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],position:{start:882,end:922},output:[{type:"raw",value:'  <div class="ct-webform ',position:{start:923,end:948}},{type:"output_whitespace_post",position:{start:948,end:969},stack:[{type:"Twig.expression.type.variable",value:"modifier_class",match:["modifier_class"],position:{start:948,end:969}}]},{type:"raw",value:'" ',position:{start:969,end:971}},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"attributes",match:["attributes"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],position:{start:971,end:1003},output:[{type:"output_whitespace_both",position:{start:1003,end:1025},stack:[{type:"Twig.expression.type.variable",value:"attributes",match:["attributes"],position:{start:1003,end:1025}},{type:"Twig.expression.type.filter",value:"raw",match:["|raw","raw"],position:{start:1003,end:1025}}]}]},position:{open:{start:971,end:1003},close:{start:1025,end:1036}}},{type:"raw",value:`>
    <div class="container">
      <div class="row">
        <div class="col-xxs-12">
          `,position:{start:1036,end:1133}},{type:"output",position:{start:1133,end:1161},stack:[{type:"Twig.expression.type.variable",value:"referenced_webform",match:["referenced_webform"],position:{start:1133,end:1161}},{type:"Twig.expression.type.filter",value:"raw",match:["|raw","raw"],position:{start:1133,end:1161}}]},{type:"raw",value:`
        </div>
      </div>
    </div>
  </div>
`,position:{start:1161,end:1210}}]},position:{open:{start:882,end:922},close:{start:1210,end:1221}}}],precompiled:!0});t.options.allowInlineIncludes=!0;try{let r=e.defaultAttributes?e.defaultAttributes:[];return Array.isArray(r)||(r=Object.entries(r)),a(t.render({attributes:new y(r),...e}))}catch(r){return a("An error occurred whilst rendering /app/web/themes/contrib/civictheme/components/03-organisms/webform/webform.twig: "+r.toString())}},w={title:"Organisms/Webform",component:g,argTypes:{theme:{control:{type:"radio"},options:["light","dark"]},referenced_webform:{control:{type:"text"}},with_background:{control:{type:"boolean"}},vertical_spacing:{control:{type:"radio"},options:["none","top","bottom","both"]},attributes:{control:{type:"text"}},modifier_class:{control:{type:"text"}}}},s={parameters:{layout:"padded"},args:{theme:"light",referenced_webform:"Webform title",with_background:!1,vertical_spacing:"none",attributes:"",modifier_class:""}};var o,p,n;s.parameters={...s.parameters,docs:{...(o=s.parameters)==null?void 0:o.docs,source:{originalSource:`{
  parameters: {
    layout: 'padded'
  },
  args: {
    theme: 'light',
    referenced_webform: 'Webform title',
    with_background: false,
    vertical_spacing: 'none',
    attributes: '',
    modifier_class: ''
  }
}`,...(n=(p=s.parameters)==null?void 0:p.docs)==null?void 0:n.source}}};const f=["Webform"];export{s as Webform,f as __namedExportsOrder,w as default};
