(()=>{"use strict";const e=window.qf.blocks,t=window.qf.adminComponents,l=window.React,a=window.wp.i18n,n=window.emotion,c={color:"#1f7970",icon:()=>React.createElement("svg",{id:"Capa_1","enable-background":"new 0 0 511.999 511.999",viewBox:"0 0 511.999 511.999",xmlns:"http://www.w3.org/2000/svg"},React.createElement("g",null,React.createElement("path",{d:"m123.004 481.999h-27.252v30h320.495v-30h-27.252v-44.005h-265.991z"}),React.createElement("path",{d:"m511.999 43.99v-4.332h-30v4.332c0 14.354-11.678 26.032-26.032 26.032h-157.152c-4.557-12.967-14.848-23.258-27.815-27.814v-42.208h-30v42.208c-12.968 4.556-23.259 14.847-27.815 27.815h-157.152c-14.354-.001-26.033-11.678-26.033-26.033v-4.332h-30v4.332c0 30.896 25.136 56.032 56.032 56.032h11.941l-67.973 168.079v14.673c0 40.39 32.859 73.249 73.249 73.249h33.94c40.39 0 73.249-32.859 73.249-73.249v-14.673l-67.973-168.078h100.718c4.556 12.968 14.847 23.259 27.815 27.815v209.724c-17.462 6.191-30.002 22.874-30.002 42.43v28.003h90.004v-28.003c0-19.557-12.54-36.239-30.002-42.43v-209.725c12.968-4.556 23.259-14.847 27.815-27.815h100.718l-67.971 168.079v14.673c0 40.39 32.859 73.249 73.249 73.249h33.94c40.39 0 73.249-32.859 73.249-73.249v-14.673l-67.973-168.078h11.941c30.897-.001 56.033-25.136 56.033-56.033zm-368.806 212.029h-105.946l52.973-130.988zm331.559 0h-105.946l52.973-130.987z"})),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null),React.createElement("g",null)),entryDetails:({id:e,attributes:t,value:l})=>{const{yesLabel:a,noLabel:c}=t;return React.createElement("div",{className:n.css`
				display: flex;
				flex-wrap: wrap;
				flex-direction: column;
				align-items: flex-start;
			`},React.createElement("div",{className:n.css`
					display: inline-flex;
					margin-bottom: 8px;
					padding: 5px 8px;
					border: 1px solid rgb( 184 184 184 );
					border-radius: 3px;
				`},"yes"===l?a:c))},controls:e=>{const{attributes:{yesLabel:n,noLabel:c},setAttributes:o}=e;return React.createElement(l.Fragment,null,React.createElement(t.BaseControl,null,React.createElement(t.ControlLabel,{label:(0,a.__)("Yes Label","quillforms")}),React.createElement(t.TextControl,{value:n,onChange:e=>o({yesLabel:e})})),React.createElement(t.BaseControl,null,React.createElement(t.ControlLabel,{label:(0,a.__)("No Label","quillforms")}),React.createElement(t.TextControl,{value:c,onChange:e=>o({noLabel:e})})))},logicControl:({attributes:e,value:a,setValue:c,removeCondition:o})=>{const{yesLabel:r,noLabel:s}=e;(0,l.useEffect)((()=>{a||c("yes")}),[]);const i=[{key:"yes",name:r||"Yes"},{key:"no",name:s||"No"}];return React.createElement(t.SelectControl,{className:n.css`
				margin-top: 10px;
				margin-bottom: 10px;
			`,value:i.find((e=>e.key===a)),onChange:e=>{c(e.selectedItem.key)},options:i})},title:"Legal",order:6,getChoices:({attributes:e})=>[{label:e.yesLabel,value:"yes"},{label:e.noLabel,value:"no"}]},{name:o}={name:"legal",supports:{editable:!0,required:!0,attachment:!0,description:!0,logic:!0,theme:!0,points:!0,payments:!1,choices:!0,correctAnswers:!1},attributes:{yesLabel:{type:"string",description:"The label for the 'yes' option",default:"Yes"},noLabel:{type:"string",description:"The label for the 'no' option",default:"No"}},logicalOperators:["is","is_not"]};(0,e.setBlockAdminSettings)(o,c),(window.qf=window.qf||{}).blocklibLegalBlockAdmin={}})();