Changeset 3469300
- Timestamp:
- 02/25/2026 10:12:06 AM (5 weeks ago)
- Location:
- nhsblocks
- Files:
-
- 2 added
- 10 edited
- 1 copied
-
tags/1.3.23 (copied) (copied from nhsblocks/trunk)
-
tags/1.3.23/SECURITY.md (added)
-
tags/1.3.23/build/index.asset.php (modified) (1 diff)
-
tags/1.3.23/build/index.js (modified) (1 diff)
-
tags/1.3.23/nhsblocks.php (modified) (1 diff)
-
tags/1.3.23/readme.txt (modified) (2 diffs)
-
tags/1.3.23/style.css (modified) (1 diff)
-
trunk/SECURITY.md (added)
-
trunk/build/index.asset.php (modified) (1 diff)
-
trunk/build/index.js (modified) (1 diff)
-
trunk/nhsblocks.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
nhsblocks/tags/1.3.23/build/index.asset.php
r3386349 r3469300 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime'), 'version' => ' d4cec148b032d467017e');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime'), 'version' => '7c903c5bc532c052ab2b'); -
nhsblocks/tags/1.3.23/build/index.js
r3386349 r3469300 1 (()=>{var e={574 :()=>{const{registerBlockStyle:e,unregisterBlockStyle:s}=wp.blocks;wp.domReady((()=>{s("core/image",["default","rounded"]),e("core/image",[{name:"nhsuk-image",label:"NHS Image",isDefault:!0},{name:"default",label:"Default"}]),s("core/table",["regular"]),e("core/table",[{name:"nhsuk-table-responsive",label:"NHS Table",isDefault:!0},{name:"default",label:"Default"}])}))}},s={};function t(n){var a=s[n];if(void 0!==a)return a.exports;var l=s[n]={exports:{}};return e[n](l,l.exports,t),l.exports}(()=>{"use strict";window.lodash;const e=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"59.000",height:"30"})),s=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),n=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),a=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"31.000",y:"20.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"29.000",height:"19"})),l=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),r=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),i=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"39.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),o=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"39.000",height:"30"})),c=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),h=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),d=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),{__}=wp.i18n,u=[{name:"fullwidth",label:__("Full Width","nhsblocks"),icon:e,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-full"}]]},{name:"twocols",label:__("Two Columns","nhsblocks"),isDefault:!0,icon:s,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threecols",label:__("Three Columns","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"twothreecols",label:__("Two Columns Then Three Columns","nhsblocks"),icon:r,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"threetwocols",label:__("Three Columns then Two Columns","nhsblocks"),icon:a,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threethreecols",label:__("Three Columns on Two Rows","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]}],k=window.ReactJSXRuntime,{__:m}=wp.i18n,{registerBlockType:p,createBlock:b}=wp.blocks,{RichText:g,InspectorControls:x,URLInputButton:v,ColorPalette:j,MediaUpload:_,InnerBlocks:w,__experimentalBlockVariationPicker:y}=wp.blockEditor,{useDispatch:N,useSelect:T}=wp.data;p("nhsblocks/dashboardnav",{title:m("Dashboard Navigation","nhsblocks"),category:"nhsblocks",icon:"tagcloud",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=N("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=T((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>b(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(w,{template:u})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(y,{variations:u,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-dashboard",children:(0,k.jsx)(w.Content,{})})})}}),p("nhsblocks/dashpanel",{title:m("Dashboard Region","nhsblocks"),description:m("Simple image background with text and link to give Dashboard navigation panel"),icon:"feedback",category:"nhsblocks",parent:["nhsblocks/dashboardnav"],attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l,panelTitle:r,panelLink:i}=t;return[(0,k.jsxs)(x,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this panel"}),(0,k.jsx)(v,{className:"nhsblocks-dropdown__input",label:m("Dashboard Link","nhsblocks"),onChange:e=>{s({panelLink:e})},url:i})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(_,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you choose an image above)"}),(0,k.jsx)(j,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("div",{className:`${n} nhsuk-panel-group__item`,children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g,{placeholder:m("Panel Title","nhsblocks"),value:r,onChange:e=>{s({panelTitle:e})}})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})]},save:e=>{const{attributes:{overlayColor:s,backgroundImage:t,panelTitle:n,panelLink:a}}=e;return(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:a,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${s}`},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g.Content,{value:n})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:n})]})})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:e.panelLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${e.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${e.overlayColor}`},children:[(0,k.jsxs)("h3",{className:"nhsuk-panel-with-label__label",children:["`$",e.panelTitle,"`"]}),(0,k.jsx)("img",{src:"/wp-content/themes/nightingale-2-0/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})})}]});const{__:f}=wp.i18n,{registerBlockType:C}=wp.blocks,{RichText:B,InnerBlocks:I}=wp.blockEditor;C("nhsblocks/dodont",{title:f("Do and Don't List","nhsblocks"),category:"nhsblocks",icon:"yes-alt",example:{attributes:{panelTitle:"Do and Dont List"},innerBlocks:[{name:"nhsblocks/doitem",attributes:{panelText:"This is an item to definitely do"}},{name:"nhsblocks/dontitem",attributes:{panelText:"This is an item to definitely NOT do"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B,{placeholder:f("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(I,{allowedBlocks:[]})})]})},save:e=>{const{attributes:{panelTitle:s,panelText:t}}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B.Content,{value:s})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(I.Content,{})})]})}}),C("nhsblocks/doitem",{title:f("List Item with Tick","nhsblocks"),category:"nhsblocks",icon:"yes",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}}),C("nhsblocks/dontitem",{title:f("List Item with Cross","nhsblocks"),category:"nhsblocks",icon:"no-alt",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}});const{__:L}=wp.i18n,{registerBlockType:E}=wp.blocks,{RichText:P,InspectorControls:S,BlockControls:A,BlockVerticalAlignmentToolbar:q,URLInputButton:R}=wp.blockEditor;E("nhsblocks/nhsbutton",{title:L("Button","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"green",label:L("Standard (Green)"),isDefault:!0},{name:"secondary",label:L("Secondary (Grey)")},{name:"reverse",label:L("Reverse (White)")}],supports:{align:!0},example:{attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",verticalAlignment:"left"}},attributes:{buttonLabel:{type:"string",source:"html",selector:".nhsuk-button"},buttonLink:{type:"string",source:"attribute",selector:"a.nhsuk-button",attribute:"href"},verticalAlignment:{type:"string"}},edit:e=>{const{attributes:{buttonLabel:s,buttonLink:t,verticalAlignment:n},className:a,setAttributes:l}=e;return[(0,k.jsx)(S,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this button by clicking the chain icon below."}),(0,k.jsx)(R,{className:"nhsblocks-dropdown__input",label:L("Button URL","nhsblocks"),onChange:e=>{l({buttonLink:e})},url:t})]})}),(0,k.jsx)(A,{children:(0,k.jsx)(q,{onChange:e=>{l({verticalAlignment:e})},value:n})}),(0,k.jsx)("div",{className:`${a} nhsuk-button`,children:(0,k.jsx)(P,{value:s,onChange:e=>{l({buttonLabel:e})},placeholder:"Button label"})})]},save:e=>{const{attributes:{buttonLabel:s,buttonLink:t}}=e;return(0,k.jsx)("a",{href:t,className:"nhsuk-button",children:(0,k.jsx)(P.Content,{value:s})})}});const{__:D}=wp.i18n,{registerBlockType:O}=wp.blocks,{RichText:$,InnerBlocks:H,InspectorControls:U,useBlockProps:V}=wp.blockEditor,{ToggleControl:Q,PanelBody:z,PanelRow:W,RadioControl:G,clientId:M}=wp.components,F=[["core/image",{align:"right",width:"150px"}]];O("nhsblocks/reveal1",{title:D("Simple Reveal","nhsblocks"),category:"nhsblocks",icon:"plus-alt",styles:[{name:"downarrow",label:D("Down Arrow"),isDefault:!0},{name:"expander",label:D("Plus Icon")}],example:{attributes:{revealTitle:"Expandable Region",revealText:"This is text inside an expandable region. It all shows up when this region is opened, but can also be minimised",className:"is-style-expander"}},attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=V(),{attributes:{revealTitle:t,revealText:n,withImage:a},className:l,setAttributes:r}=e;return[(0,k.jsx)(U,{children:(0,k.jsx)(z,{children:(0,k.jsx)(W,{children:(0,k.jsx)(Q,{label:"Include an image?",checked:a,onChange:e=>r({withImage:e})})})})}),(0,k.jsxs)("details",{className:`${l} nhsuk-details newstyle`,open:!0,children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($,{placeholder:D("Reveal Title","nhsblocks"),value:t,onChange:e=>{r({revealTitle:e})}})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H,{template:F}),(0,k.jsx)($,{...s,placeholder:D("Reveal Contents","nhsblocks"),onChange:e=>{r({revealText:e})},value:n})]})]})]},save:e=>{const s=V.save(),{attributes:{revealTitle:t,revealText:n,withImage:a}}=e;return(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($.Content,{value:t})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H.Content,{}),(0,k.jsx)($.Content,{...s,value:n})]})]})},deprecated:[{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})},{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})}]});const{__:Y}=wp.i18n,{registerBlockType:J}=wp.blocks,{RichText:X,InnerBlocks:K}=wp.blockEditor,Z=[["core/paragraph",{placeholder:"Panel Text"}],["nhsblocks/nhsbutton",{align:"right"}]];J("nhsblocks/panel1",{title:Y("Panel Region","nhsblocks"),description:Y("By default this block includes a title, block of text and button link. You can remove the button if you wish by clicking it then clicking three dots on the navigation bar at the top of the page then the bin","nhsblocks"),icon:"feedback",category:"nhsblocks",styles:[{name:"default",label:Y("Plain white panel"),isDefault:!0},{name:"panel-grey",label:Y("Grey")},{name:"panel-with-label",label:Y("With Label")}],example:{attributes:{panelTitle:"Example Panel",className:"is-style-panel-grey"},innerBlocks:[{name:"core/paragraph",attributes:{content:Y("This is the content of a panel block, and it has lots of useful information")}},{name:"nhsblocks/nhsbutton",attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",className:"is-style-secondary",align:"right"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-panel1 h2"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X,{placeholder:Y("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K,{template:Z})})]})})},save:e=>{const{attributes:{panelTitle:s,className:t}}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X.Content,{value:s})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K.Content,{})})]})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-panel",children:[(0,k.jsx)("h3",{children:(0,k.jsx)(X.Content,{value:e.panelTitle})}),(0,k.jsx)("div",{className:"paneltext",children:(0,k.jsx)(K.Content,{})})]})}]});const{__:ee}=wp.i18n,{registerBlockType:se}=wp.blocks,{RichText:te,InspectorControls:ne,BlockControls:ae,BlockVerticalAlignmentToolbar:le}=wp.blockEditor;se("nhsblocks/tags",{title:ee("Tag","nhsblocks"),description:ee("Tags are just used to indicate a status. Do not add links. Use adjectives rather than verbs for the names of your tags. Using a verb might make a user think that clicking on them will do something","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"blue",label:ee("Standard (Blue)"),isDefault:!0},{name:"white",label:ee("White")},{name:"grey",label:ee("Grey")},{name:"green",label:ee("Green")},{name:"aqua-green",label:ee("Aqua Green")},{name:"blue",label:ee("Light Blue")},{name:"purple",label:ee("Purple")},{name:"pink",label:ee("Pink")},{name:"red",label:ee("Red")},{name:"orange",label:ee("Orange")},{name:"yellow",label:ee("Yellow")}],supports:{align:!1},example:{attributes:{tagLabel:"New"}},attributes:{tagLabel:{type:"string",source:"html",selector:".nhsuk-tag"}},edit:e=>{const{attributes:{tagLabel:s},className:t,setAttributes:n}=e;return[(0,k.jsx)("strong",{className:`${t} nhsuk-tag`,children:(0,k.jsx)(te,{value:s,onChange:e=>{n({tagLabel:e})},placeholder:"Tag label"})})]},save:e=>{const{attributes:{tagLabel:s}}=e;return(0,k.jsx)("strong",{className:"nhsuk-tag",children:(0,k.jsx)(te.Content,{value:s})})}});const{__:re}=wp.i18n,{registerBlockType:ie}=wp.blocks,{URLInputButton:oe,RichText:ce,InnerBlocks:he,MediaUpload:de,InspectorControls:ue,useBlockProps:ke}=wp.blockEditor;ie("nhsblocks/promo1",{title:re("Promo Region","nhsblocks"),category:"nhsblocks",icon:"megaphone",styles:[{name:"default",label:re("Standard"),isDefault:!0},{name:"promo-small",label:re("Smaller Text")}],example:{attributes:{promoTitle:"Promo Box",promoText:"This is the content of the box to send users to your promoted page",promoLink:"https://www.nhs.uk",align:"center"},innerBlocks:[{name:"core/image",attributes:{url:"https://assets.nhs.uk/prod/images/A_0218_healthy-eating-main_BATM01_copy.width-690.jpg"}}]},attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__link"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},edit:e=>{const s=ke(),{attributes:{promoTitle:t,promoText:n,promoLink:a},className:l,setAttributes:r}=e;return(0,k.jsxs)("div",{className:`${l} nhsuk-card nhsuk-card--clickable`,children:[(0,k.jsx)(he,{allowedBlocks:["core/image"]}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsxs)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:[(0,k.jsx)(oe,{className:"nhsblocks-dropdown__input",label:re("Panel Link","nhsblocks"),onChange:e=>{r({promoLink:e})},url:a}),(0,k.jsx)(ce,{placeholder:re("Promo Title","nhsblocks"),value:t,onChange:e=>{r({promoTitle:e})}})]}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce,{...s,placeholder:re("Promo Contents","nhsblocks"),onChange:e=>{r({promoText:e})},value:n})})]})]})},save:e=>{const s=ke.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(he.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)("a",{href:a,className:"nhsuk-card__link",children:(0,k.jsx)(ce.Content,{value:t})})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce.Content,{...s,value:n})})]})]})},deprecated:[{attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__content .nhsuk-card__heading"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},save:e=>{const s=ke.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;var l=t.replace("</a>","").replace("</a>","</a></a>");return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(he.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)(ce.Content,{...s,value:l})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce.Content,{...s,value:n})})]})]})}},{attributes:{promoTitle:{type:"string",source:"html",selector:".nhsuk-promo__heading"},promoText:{type:"string",source:"html",selector:".nhsuk-promo__description"},promoLink:{type:"string",source:"attribute",selector:".nhsuk-promo a",attribute:"href"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-promo",children:(0,k.jsx)("a",{href:e.promoLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-promo__content",children:[(0,k.jsx)(he.Content,{}),(0,k.jsx)("h3",{className:"nhsuk-promo__heading",children:e.promoTitle}),(0,k.jsx)("div",{className:"nhsuk-promo__description",children:e.promoText})]})})})}]});const{__:me}=wp.i18n,pe=[["nhsblocks/promo1"]],be=[{name:"twocolspro",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onehalfpro"]]},{name:"threecolspro",label:me("Three Columns Promos","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"]]},{name:"one3two3pro",label:me("One Third / Two Thirds Columns Promos","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/twothirdspro"]]},{name:"two3one3pro",label:me("Two Thirds / One Third Columns Promos","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/twothirdspro"],["nhsblocks/onethirdpro"]]},{name:"one4one2one4pro",label:me("One Quarter / One Half / One Quarter Columns Promos","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"]]},{name:"one4one4one2pro",label:me("One Quarter / One Quarter / One Half Columns Promos","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"]]},{name:"one2one4one4",label:me("One Half / One Quarter / One Quarter Columns Promos","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"]]}],{__:ge}=wp.i18n,{registerBlockType:xe,createBlock:ve}=wp.blocks,{InnerBlocks:je,__experimentalBlockVariationPicker:_e}=wp.blockEditor,{useDispatch:we,useSelect:ye}=wp.data;xe("nhsblocks/promogroup",{title:ge("Grouped Promos","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=we("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=ye((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ve(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(je,{template:be})}):(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(_e,{variations:be,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(je.Content,{})})}}),xe("nhsblocks/onehalfpro",{title:ge("One Half Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/onethirdpro",{title:ge("One Third Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/onequarterpro",{title:ge("One Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/twothirdspro",{title:ge("Two Thirds Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/threequarterspro",{title:ge("Three Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})});const{__:Ne}=wp.i18n,{registerBlockType:Te}=wp.blocks,{RichText:fe,useBlockProps:Ce}=wp.blockEditor;Te("nhsblocks/quote1",{title:Ne("Simple Quote","nhsblocks"),category:"nhsblocks",icon:"format-quote",styles:[{name:"standard",label:Ne("Standard"),isDefault:!0},{name:"quote-reverse",label:Ne("Inverse")}],example:{attributes:{quoteName:"Tony Blacker",quoteText:"Nightingale is an incredibly flexible theme. With NHSBlocks added in, it is amazing."}},attributes:{quoteName:{type:"string",source:"html",selector:".nhsuk-inset-text__quote-attribution"},quoteText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-inset-text__quote"}},edit:e=>{const s=Ce(),{attributes:{quoteName:t,quoteText:n},className:a,setAttributes:l}=e;return(0,k.jsxs)("div",{className:`${a} nhsuk-inset-text`,children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(fe,{...s,placeholder:Ne("Quote","nhsblocks"),onChange:e=>{l({quoteText:e})},value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(fe,{placeholder:Ne("Quote Name","nhsblocks"),value:t,onChange:e=>{l({quoteName:e})}})})]})},save:e=>{const s=Ce.save(),{attributes:{quoteName:t,quoteText:n}}=e;return(0,k.jsxs)("div",{className:"nhsuk-inset-text",children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(fe.Content,{...s,value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(fe.Content,{value:t})})]})}});const{__:Be}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{RichText:Le,InnerBlocks:Ee,InspectorControls:Pe,useBlockProps:Se}=wp.blockEditor,{ToggleControl:Ae,PanelBody:qe,PanelRow:Re,RadioControl:De}=wp.components,{withState:Oe}=wp.compose,$e=[["core/image",{align:"right",width:150}]];Ie("nhsblocks/card1",{title:Be("Card Region","nhsblocks"),category:"nhsblocks",icon:"category",example:{attributes:{cardTitle:"This is a card",cardText:"This is the content of the card"},innerBlocks:[{name:"core/image",attributes:{align:"right",width:150}}]},attributes:{innerBlocks_length:{type:"number",default:0},cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=Se(),{attributes:{cardTitle:t,cardText:n,withImage:a},clientId:l,className:r,setAttributes:i}=e;return[(0,k.jsx)(Pe,{children:(0,k.jsx)(qe,{children:(0,k.jsx)(Re,{children:(0,k.jsx)(Ae,{label:"Include an image?",checked:a,onChange:e=>i({withImage:e})})})})}),(0,k.jsxs)("div",{className:`${r} nhsuk-care-card`,children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le,{placeholder:Be("Card Title","nhsblocks"),value:t,onChange:e=>{i({cardTitle:e})}})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Ee,{template:$e}),(0,k.jsx)(Le,{...s,placeholder:Be("Card Contents","nhsblocks"),onChange:e=>{i({cardText:e})},value:n})]})]})]},save:e=>{const s=Se.save(),{attributes:{cardTitle:t,cardText:n,withImage:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:t})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Ee.Content,{}),(0,k.jsx)(Le.Content,{...s,value:n})]})]})},deprecated:[{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading","aria-level":"3",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--care",children:[(0,k.jsxs)("div",{className:"nhsuk-card--care__heading-container",children:[(0,k.jsx)("h2",{className:"nhsuk-card--care__heading",children:(0,k.jsx)("span",{role:"text",className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})}),(0,k.jsx)("span",{className:"nhsuk-card--care__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-card__content",children:(0,k.jsx)(Le.Content,{...Se.save(),multiline:"p",value:e.cardText})})]})}]}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"default",label:"Standard Blue",isDefault:!0}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"urgent",label:"Urgent (Red)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"immediate",label:"Immediate (Red and Black)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"warning-callout",label:"Warning Callout (Yellow)"});const{__:He}=wp.i18n,Ue=[{name:"twocols",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onehalf"]]},{name:"threecols",label:He("Three Columns Generic","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/onethird"],["nhsblocks/onethird"]]},{name:"one3two3",label:He("One Third / Two Thirds Columns Generic","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/twothirds"]]},{name:"two3one3",label:He("Two Thirds / One Third Columns Generic","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/twothirds"],["nhsblocks/onethird"]]},{name:"one4one2one4",label:He("One Quarter / One Half / One Quarter Columns Generic","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onehalf"],["nhsblocks/onequarter"]]},{name:"one4one4one2",label:He("One Quarter / One Quarter / One Half Columns Generic","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onequarter"],["nhsblocks/onehalf"]]},{name:"one2one4one4",label:He("One Half / One Quarter / One Quarter Columns Generic","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onequarter"],["nhsblocks/onequarter"]]}],{__:Ve}=wp.i18n,{registerBlockType:Qe,createBlock:ze}=wp.blocks,{InnerBlocks:We,__experimentalBlockVariationPicker:Ge}=wp.blockEditor,{useDispatch:Me,useSelect:Fe}=wp.data;Qe("nhsblocks/rowgroup",{title:Ve("Grouped Items","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=Me("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=Fe((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ze(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(We,{template:Ue})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(Ge,{variations:Ue,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(We.Content,{})})})}}),Qe("nhsblocks/onehalf",{title:Ve("One Half Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/onethird",{title:Ve("One Third Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/onequarter",{title:Ve("One Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/twothirds",{title:Ve("Two Thirds Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/threequarters",{title:Ve("Three Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(We.Content,{})})}});const{__:Ye}=wp.i18n,{registerBlockType:Je}=wp.blocks,{RichText:Xe,InspectorControls:Ke,ColorPalette:Ze,MediaUpload:es,InnerBlocks:ss}=wp.blockEditor;Je("nhsblocks/heroblock",{title:Ye("Hero Block","nhsblocks"),description:Ye("Full width zone, designed to go at the top of your page with an optional image background, texta area and call to action","nhsblocks"),category:"nhsblocks",icon:"schedule",example:{attributes:{backgroundImage:"https://assets.nhs.uk/prod/images/S_0818_homepage_hero_1_F0147446.width-1000.jpg"},innerBlocks:[{name:"nhsblocks/heroinner",attributes:{texttitle:"This is a title",texttext:"This is a subtitle"}}]},attributes:{overlayColor:{type:"string",default:"#005eb8"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l}=t;return[(0,k.jsxs)(Ke,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(es,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you chose an image above)"}),(0,k.jsx)(Ze,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("section",{className:`${n} nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description`,style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ss,{template:[["nhsblocks/heroinner",{}]]})})})})})})]},save:e=>{const{attributes:s,className:t}=e,{overlayColor:n,backgroundImage:a}=s;return(0,k.jsx)("section",{className:"nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description",style:{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${n}`},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ss.Content,{})})})})})})}}),Je("nhsblocks/heroinner",{title:Ye("Hero Block Inner Text","nhsblocks"),description:Ye("Add some text to the header","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"nametag",attributes:{texttitle:{type:"array",source:"children",selector:"h1"},texttext:{type:"array",source:"children",selector:"p"},fontColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{fontColor:a}=t;return[(0,k.jsx)(Ke,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a font color:"}),(0,k.jsx)(Ze,{value:a,onChange:function(e){s({fontColor:e})}})]})}),(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Xe,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",value:t.texttitle,onChange:function(e){s({texttitle:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)(Xe,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",value:t.texttext,onChange:function(e){s({texttext:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})]},save:e=>{const{attributes:s,className:t}=e,{fontColor:n}=s;return(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Xe.Content,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",style:{color:n},value:s.texttitle}),(0,k.jsx)(Xe.Content,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",style:{color:n},value:s.texttext}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})}});const{__:ts}=wp.i18n,{registerBlockType:ns}=wp.blocks,{InnerBlocks:as}=wp.blockEditor;ns("nhsblocks/stripesblock",{title:ts("Stripes Block","nhsblocks"),description:ts("Outer block that allows alternate grey stripes. To be used with the Full Width for Stripes template ","nhsblocks"),category:"nhsblocks",icon:"menu-alt",attributes:{},example:{innerBlocks:[{name:"nhsblocks/stripeblock",innerBlocks:[{name:"core/paragraph",attributes:{1 (()=>{var e={574(){const{registerBlockStyle:e,unregisterBlockStyle:s}=wp.blocks;wp.domReady((()=>{s("core/image",["default","rounded"]),e("core/image",[{name:"nhsuk-image",label:"NHS Image",isDefault:!0},{name:"default",label:"Default"}]),s("core/table",["regular"]),e("core/table",[{name:"nhsuk-table-responsive",label:"NHS Table",isDefault:!0},{name:"default",label:"Default"}])}))}},s={};function t(n){var a=s[n];if(void 0!==a)return a.exports;var l=s[n]={exports:{}};return e[n](l,l.exports,t),l.exports}(()=>{"use strict";window.lodash;const e=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"59.000",height:"30"})),s=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),n=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),a=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"31.000",y:"20.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"29.000",height:"19"})),l=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),r=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),i=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"39.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),o=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"39.000",height:"30"})),c=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),h=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),d=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),{__}=wp.i18n,u=[{name:"fullwidth",label:__("Full Width","nhsblocks"),icon:e,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-full"}]]},{name:"twocols",label:__("Two Columns","nhsblocks"),isDefault:!0,icon:s,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threecols",label:__("Three Columns","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"twothreecols",label:__("Two Columns Then Three Columns","nhsblocks"),icon:r,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"threetwocols",label:__("Three Columns then Two Columns","nhsblocks"),icon:a,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threethreecols",label:__("Three Columns on Two Rows","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]}],k=window.ReactJSXRuntime,{__:m}=wp.i18n,{registerBlockType:p,createBlock:b}=wp.blocks,{RichText:g,InspectorControls:x,URLInputButton:v,ColorPalette:j,MediaUpload:_,InnerBlocks:w,__experimentalBlockVariationPicker:y}=wp.blockEditor,{useDispatch:N,useSelect:T}=wp.data;p("nhsblocks/dashboardnav",{title:m("Dashboard Navigation","nhsblocks"),category:"nhsblocks",icon:"tagcloud",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=N("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=T((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>b(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(w,{template:u})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(y,{variations:u,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-dashboard",children:(0,k.jsx)(w.Content,{})})})}}),p("nhsblocks/dashpanel",{title:m("Dashboard Region","nhsblocks"),description:m("Simple image background with text and link to give Dashboard navigation panel"),icon:"feedback",category:"nhsblocks",parent:["nhsblocks/dashboardnav"],attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l,panelTitle:r,panelLink:i}=t;return[(0,k.jsxs)(x,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this panel"}),(0,k.jsx)(v,{className:"nhsblocks-dropdown__input",label:m("Dashboard Link","nhsblocks"),onChange:e=>{s({panelLink:e})},url:i})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(_,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you choose an image above)"}),(0,k.jsx)(j,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("div",{className:`${n} nhsuk-panel-group__item`,children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g,{placeholder:m("Panel Title","nhsblocks"),value:r,onChange:e=>{s({panelTitle:e})}})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})]},save:e=>{const{attributes:{overlayColor:s,backgroundImage:t,panelTitle:n,panelLink:a}}=e;return(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:a,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${s}`},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g.Content,{value:n})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:n})]})})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:e.panelLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${e.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${e.overlayColor}`},children:[(0,k.jsxs)("h3",{className:"nhsuk-panel-with-label__label",children:["`$",e.panelTitle,"`"]}),(0,k.jsx)("img",{src:"/wp-content/themes/nightingale-2-0/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})})}]});const{__:f}=wp.i18n,{registerBlockType:C}=wp.blocks,{RichText:B,InnerBlocks:I}=wp.blockEditor;C("nhsblocks/dodont",{title:f("Do and Don't List","nhsblocks"),category:"nhsblocks",icon:"yes-alt",example:{attributes:{panelTitle:"Do and Dont List"},innerBlocks:[{name:"nhsblocks/doitem",attributes:{panelText:"This is an item to definitely do"}},{name:"nhsblocks/dontitem",attributes:{panelText:"This is an item to definitely NOT do"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B,{placeholder:f("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(I,{allowedBlocks:[]})})]})},save:e=>{const{attributes:{panelTitle:s,panelText:t}}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B.Content,{value:s})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(I.Content,{})})]})}}),C("nhsblocks/doitem",{title:f("List Item with Tick","nhsblocks"),category:"nhsblocks",icon:"yes",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}}),C("nhsblocks/dontitem",{title:f("List Item with Cross","nhsblocks"),category:"nhsblocks",icon:"no-alt",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}});const{__:L}=wp.i18n,{registerBlockType:E}=wp.blocks,{RichText:P,InspectorControls:S,BlockControls:A,BlockVerticalAlignmentToolbar:q,URLInputButton:R}=wp.blockEditor;E("nhsblocks/nhsbutton",{title:L("Button","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"green",label:L("Standard (Green)"),isDefault:!0},{name:"secondary",label:L("Secondary (Grey)")},{name:"reverse",label:L("Reverse (White)")}],supports:{align:!0},example:{attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",verticalAlignment:"left"}},attributes:{buttonLabel:{type:"string",source:"html",selector:".nhsuk-button"},buttonLink:{type:"string",source:"attribute",selector:"a.nhsuk-button",attribute:"href"},verticalAlignment:{type:"string"}},edit:e=>{const{attributes:{buttonLabel:s,buttonLink:t,verticalAlignment:n},className:a,setAttributes:l}=e;return[(0,k.jsx)(S,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this button by clicking the chain icon below."}),(0,k.jsx)(R,{className:"nhsblocks-dropdown__input",label:L("Button URL","nhsblocks"),onChange:e=>{l({buttonLink:e})},url:t})]})}),(0,k.jsx)(A,{children:(0,k.jsx)(q,{onChange:e=>{l({verticalAlignment:e})},value:n})}),(0,k.jsx)("div",{className:`${a} nhsuk-button`,children:(0,k.jsx)(P,{value:s,onChange:e=>{l({buttonLabel:e})},placeholder:"Button label"})})]},save:e=>{const{attributes:{buttonLabel:s,buttonLink:t}}=e;return(0,k.jsx)("a",{href:t,className:"nhsuk-button",children:(0,k.jsx)(P.Content,{value:s})})}});const{__:D}=wp.i18n,{registerBlockType:O}=wp.blocks,{RichText:$,InnerBlocks:H,InspectorControls:U,useBlockProps:V}=wp.blockEditor,{ToggleControl:Q,PanelBody:z,PanelRow:W,RadioControl:G,clientId:M}=wp.components,F=[["core/image",{align:"right",width:"150px"}]];O("nhsblocks/reveal1",{title:D("Simple Reveal","nhsblocks"),category:"nhsblocks",icon:"plus-alt",styles:[{name:"downarrow",label:D("Down Arrow"),isDefault:!0},{name:"expander",label:D("Plus Icon")}],example:{attributes:{revealTitle:"Expandable Region",revealText:"This is text inside an expandable region. It all shows up when this region is opened, but can also be minimised",className:"is-style-expander"}},attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=V(),{attributes:{revealTitle:t,revealText:n,withImage:a},className:l,setAttributes:r}=e;return[(0,k.jsx)(U,{children:(0,k.jsx)(z,{children:(0,k.jsx)(W,{children:(0,k.jsx)(Q,{label:"Include an image?",checked:a,onChange:e=>r({withImage:e})})})})}),(0,k.jsxs)("details",{className:`${l} nhsuk-details newstyle`,open:!0,children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($,{placeholder:D("Reveal Title","nhsblocks"),value:t,onChange:e=>{r({revealTitle:e})}})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H,{template:F}),(0,k.jsx)($,{...s,placeholder:D("Reveal Contents","nhsblocks"),onChange:e=>{r({revealText:e})},value:n})]})]})]},save:e=>{const s=V.save(),{attributes:{revealTitle:t,revealText:n,withImage:a}}=e;return(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($.Content,{value:t})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H.Content,{}),(0,k.jsx)($.Content,{...s,value:n})]})]})},deprecated:[{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})},{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})}]});const{__:Y}=wp.i18n,{registerBlockType:J}=wp.blocks,{RichText:X,InnerBlocks:K}=wp.blockEditor,Z=[["core/paragraph",{placeholder:"Panel Text"}],["nhsblocks/nhsbutton",{align:"right"}]];J("nhsblocks/panel1",{title:Y("Panel Region","nhsblocks"),description:Y("By default this block includes a title, block of text and button link. You can remove the button if you wish by clicking it then clicking three dots on the navigation bar at the top of the page then the bin","nhsblocks"),icon:"feedback",category:"nhsblocks",styles:[{name:"default",label:Y("Plain white panel"),isDefault:!0},{name:"panel-grey",label:Y("Grey")},{name:"panel-with-label",label:Y("With Label")}],example:{attributes:{panelTitle:"Example Panel",className:"is-style-panel-grey"},innerBlocks:[{name:"core/paragraph",attributes:{content:Y("This is the content of a panel block, and it has lots of useful information")}},{name:"nhsblocks/nhsbutton",attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",className:"is-style-secondary",align:"right"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-panel1 h2"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X,{placeholder:Y("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K,{template:Z})})]})})},save:e=>{const{attributes:{panelTitle:s,className:t}}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X.Content,{value:s})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K.Content,{})})]})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-panel",children:[(0,k.jsx)("h3",{children:(0,k.jsx)(X.Content,{value:e.panelTitle})}),(0,k.jsx)("div",{className:"paneltext",children:(0,k.jsx)(K.Content,{})})]})}]});const{__:ee}=wp.i18n,{registerBlockType:se}=wp.blocks,{RichText:te,InspectorControls:ne,BlockControls:ae,BlockVerticalAlignmentToolbar:le}=wp.blockEditor;se("nhsblocks/tags",{title:ee("Tag","nhsblocks"),description:ee("Tags are just used to indicate a status. Do not add links. Use adjectives rather than verbs for the names of your tags. Using a verb might make a user think that clicking on them will do something","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"blue",label:ee("Standard (Blue)"),isDefault:!0},{name:"white",label:ee("White")},{name:"grey",label:ee("Grey")},{name:"green",label:ee("Green")},{name:"aqua-green",label:ee("Aqua Green")},{name:"blue",label:ee("Light Blue")},{name:"purple",label:ee("Purple")},{name:"pink",label:ee("Pink")},{name:"red",label:ee("Red")},{name:"orange",label:ee("Orange")},{name:"yellow",label:ee("Yellow")}],supports:{align:!1},example:{attributes:{tagLabel:"New"}},attributes:{tagLabel:{type:"string",source:"html",selector:".nhsuk-tag"}},edit:e=>{const{attributes:{tagLabel:s},className:t,setAttributes:n}=e;return[(0,k.jsx)("strong",{className:`${t} nhsuk-tag`,children:(0,k.jsx)(te,{value:s,onChange:e=>{n({tagLabel:e})},placeholder:"Tag label"})})]},save:e=>{const{attributes:{tagLabel:s}}=e;return(0,k.jsx)("strong",{className:"nhsuk-tag",children:(0,k.jsx)(te.Content,{value:s})})}});const{__:re}=wp.i18n,{registerBlockType:ie}=wp.blocks,{URLInputButton:oe,RichText:ce,InnerBlocks:he,MediaUpload:de,InspectorControls:ue,useBlockProps:ke}=wp.blockEditor;ie("nhsblocks/promo1",{title:re("Promo Region","nhsblocks"),category:"nhsblocks",icon:"megaphone",styles:[{name:"default",label:re("Standard"),isDefault:!0},{name:"promo-small",label:re("Smaller Text")}],example:{attributes:{promoTitle:"Promo Box",promoText:"This is the content of the box to send users to your promoted page",promoLink:"https://www.nhs.uk",align:"center"},innerBlocks:[{name:"core/image",attributes:{url:"https://assets.nhs.uk/prod/images/A_0218_healthy-eating-main_BATM01_copy.width-690.jpg"}}]},attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__link"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},edit:e=>{const s=ke(),{attributes:{promoTitle:t,promoText:n,promoLink:a},className:l,setAttributes:r}=e;return(0,k.jsxs)("div",{className:`${l} nhsuk-card nhsuk-card--clickable`,children:[(0,k.jsx)(he,{allowedBlocks:["core/image"]}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsxs)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:[(0,k.jsx)(oe,{className:"nhsblocks-dropdown__input",label:re("Panel Link","nhsblocks"),onChange:e=>{r({promoLink:e})},url:a}),(0,k.jsx)(ce,{placeholder:re("Promo Title","nhsblocks"),value:t,onChange:e=>{r({promoTitle:e})}})]}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce,{...s,placeholder:re("Promo Contents","nhsblocks"),onChange:e=>{r({promoText:e})},value:n})})]})]})},save:e=>{const s=ke.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(he.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)("a",{href:a,className:"nhsuk-card__link",children:(0,k.jsx)(ce.Content,{value:t})})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce.Content,{...s,value:n})})]})]})},deprecated:[{attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__content .nhsuk-card__heading"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},save:e=>{const s=ke.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;var l=t.replace("</a>","").replace("</a>","</a></a>");return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(he.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)(ce.Content,{...s,value:l})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce.Content,{...s,value:n})})]})]})}},{attributes:{promoTitle:{type:"string",source:"html",selector:".nhsuk-promo__heading"},promoText:{type:"string",source:"html",selector:".nhsuk-promo__description"},promoLink:{type:"string",source:"attribute",selector:".nhsuk-promo a",attribute:"href"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-promo",children:(0,k.jsx)("a",{href:e.promoLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-promo__content",children:[(0,k.jsx)(he.Content,{}),(0,k.jsx)("h3",{className:"nhsuk-promo__heading",children:e.promoTitle}),(0,k.jsx)("div",{className:"nhsuk-promo__description",children:e.promoText})]})})})}]});const{__:me}=wp.i18n,pe=[["nhsblocks/promo1"]],be=[{name:"twocolspro",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onehalfpro"]]},{name:"threecolspro",label:me("Three Columns Promos","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"]]},{name:"one3two3pro",label:me("One Third / Two Thirds Columns Promos","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/twothirdspro"]]},{name:"two3one3pro",label:me("Two Thirds / One Third Columns Promos","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/twothirdspro"],["nhsblocks/onethirdpro"]]},{name:"one4one2one4pro",label:me("One Quarter / One Half / One Quarter Columns Promos","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"]]},{name:"one4one4one2pro",label:me("One Quarter / One Quarter / One Half Columns Promos","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"]]},{name:"one2one4one4",label:me("One Half / One Quarter / One Quarter Columns Promos","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"]]}],{__:ge}=wp.i18n,{registerBlockType:xe,createBlock:ve}=wp.blocks,{InnerBlocks:je,__experimentalBlockVariationPicker:_e}=wp.blockEditor,{useDispatch:we,useSelect:ye}=wp.data;xe("nhsblocks/promogroup",{title:ge("Grouped Promos","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=we("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=ye((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ve(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(je,{template:be})}):(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(_e,{variations:be,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(je.Content,{})})}}),xe("nhsblocks/onehalfpro",{title:ge("One Half Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/onethirdpro",{title:ge("One Third Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/onequarterpro",{title:ge("One Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/twothirdspro",{title:ge("Two Thirds Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/threequarterspro",{title:ge("Three Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})});const{__:Ne}=wp.i18n,{registerBlockType:Te}=wp.blocks,{RichText:fe,useBlockProps:Ce}=wp.blockEditor;Te("nhsblocks/quote1",{title:Ne("Simple Quote","nhsblocks"),category:"nhsblocks",icon:"format-quote",styles:[{name:"standard",label:Ne("Standard"),isDefault:!0},{name:"quote-reverse",label:Ne("Inverse")}],example:{attributes:{quoteName:"Tony Blacker",quoteText:"Nightingale is an incredibly flexible theme. With NHSBlocks added in, it is amazing."}},attributes:{quoteName:{type:"string",source:"html",selector:".nhsuk-inset-text__quote-attribution"},quoteText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-inset-text__quote"}},edit:e=>{const s=Ce(),{attributes:{quoteName:t,quoteText:n},className:a,setAttributes:l}=e;return(0,k.jsxs)("div",{className:`${a} nhsuk-inset-text`,children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(fe,{...s,placeholder:Ne("Quote","nhsblocks"),onChange:e=>{l({quoteText:e})},value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(fe,{placeholder:Ne("Quote Name","nhsblocks"),value:t,onChange:e=>{l({quoteName:e})}})})]})},save:e=>{const s=Ce.save(),{attributes:{quoteName:t,quoteText:n}}=e;return(0,k.jsxs)("div",{className:"nhsuk-inset-text",children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(fe.Content,{...s,value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(fe.Content,{value:t})})]})}});const{__:Be}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{RichText:Le,InnerBlocks:Ee,InspectorControls:Pe,useBlockProps:Se}=wp.blockEditor,{ToggleControl:Ae,PanelBody:qe,PanelRow:Re,RadioControl:De}=wp.components,{withState:Oe}=wp.compose,$e=[["core/image",{align:"right",width:150}]];Ie("nhsblocks/card1",{title:Be("Card Region","nhsblocks"),category:"nhsblocks",icon:"category",example:{attributes:{cardTitle:"This is a card",cardText:"This is the content of the card"},innerBlocks:[{name:"core/image",attributes:{align:"right",width:150}}]},attributes:{innerBlocks_length:{type:"number",default:0},cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=Se(),{attributes:{cardTitle:t,cardText:n,withImage:a},clientId:l,className:r,setAttributes:i}=e;return[(0,k.jsx)(Pe,{children:(0,k.jsx)(qe,{children:(0,k.jsx)(Re,{children:(0,k.jsx)(Ae,{label:"Include an image?",checked:a,onChange:e=>i({withImage:e})})})})}),(0,k.jsxs)("div",{className:`${r} nhsuk-care-card`,children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le,{placeholder:Be("Card Title","nhsblocks"),value:t,onChange:e=>{i({cardTitle:e})}})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Ee,{template:$e}),(0,k.jsx)(Le,{...s,placeholder:Be("Card Contents","nhsblocks"),onChange:e=>{i({cardText:e})},value:n})]})]})]},save:e=>{const s=Se.save(),{attributes:{cardTitle:t,cardText:n,withImage:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:t})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Ee.Content,{}),(0,k.jsx)(Le.Content,{...s,value:n})]})]})},deprecated:[{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading","aria-level":"3",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--care",children:[(0,k.jsxs)("div",{className:"nhsuk-card--care__heading-container",children:[(0,k.jsx)("h2",{className:"nhsuk-card--care__heading",children:(0,k.jsx)("span",{role:"text",className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})}),(0,k.jsx)("span",{className:"nhsuk-card--care__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-card__content",children:(0,k.jsx)(Le.Content,{...Se.save(),multiline:"p",value:e.cardText})})]})}]}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"default",label:"Standard Blue",isDefault:!0}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"urgent",label:"Urgent (Red)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"immediate",label:"Immediate (Red and Black)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"warning-callout",label:"Warning Callout (Yellow)"});const{__:He}=wp.i18n,Ue=[{name:"twocols",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onehalf"]]},{name:"threecols",label:He("Three Columns Generic","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/onethird"],["nhsblocks/onethird"]]},{name:"one3two3",label:He("One Third / Two Thirds Columns Generic","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/twothirds"]]},{name:"two3one3",label:He("Two Thirds / One Third Columns Generic","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/twothirds"],["nhsblocks/onethird"]]},{name:"one4one2one4",label:He("One Quarter / One Half / One Quarter Columns Generic","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onehalf"],["nhsblocks/onequarter"]]},{name:"one4one4one2",label:He("One Quarter / One Quarter / One Half Columns Generic","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onequarter"],["nhsblocks/onehalf"]]},{name:"one2one4one4",label:He("One Half / One Quarter / One Quarter Columns Generic","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onequarter"],["nhsblocks/onequarter"]]}],{__:Ve}=wp.i18n,{registerBlockType:Qe,createBlock:ze}=wp.blocks,{InnerBlocks:We,__experimentalBlockVariationPicker:Ge}=wp.blockEditor,{useDispatch:Me,useSelect:Fe}=wp.data;Qe("nhsblocks/rowgroup",{title:Ve("Grouped Items","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=Me("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=Fe((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ze(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(We,{template:Ue})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(Ge,{variations:Ue,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(We.Content,{})})})}}),Qe("nhsblocks/onehalf",{title:Ve("One Half Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/onethird",{title:Ve("One Third Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/onequarter",{title:Ve("One Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/twothirds",{title:Ve("Two Thirds Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/threequarters",{title:Ve("Three Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(We.Content,{})})}});const{__:Ye}=wp.i18n,{registerBlockType:Je}=wp.blocks,{RichText:Xe,InspectorControls:Ke,ColorPalette:Ze,MediaUpload:es,InnerBlocks:ss}=wp.blockEditor;Je("nhsblocks/heroblock",{title:Ye("Hero Block","nhsblocks"),description:Ye("Full width zone, designed to go at the top of your page with an optional image background, texta area and call to action","nhsblocks"),category:"nhsblocks",icon:"schedule",example:{attributes:{backgroundImage:"https://assets.nhs.uk/prod/images/S_0818_homepage_hero_1_F0147446.width-1000.jpg"},innerBlocks:[{name:"nhsblocks/heroinner",attributes:{texttitle:"This is a title",texttext:"This is a subtitle"}}]},attributes:{overlayColor:{type:"string",default:"#005eb8"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l}=t;return[(0,k.jsxs)(Ke,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(es,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you chose an image above)"}),(0,k.jsx)(Ze,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("section",{className:`${n} nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description`,style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ss,{template:[["nhsblocks/heroinner",{}]]})})})})})})]},save:e=>{const{attributes:s,className:t}=e,{overlayColor:n,backgroundImage:a}=s;return(0,k.jsx)("section",{className:"nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description",style:{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${n}`},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ss.Content,{})})})})})})}}),Je("nhsblocks/heroinner",{title:Ye("Hero Block Inner Text","nhsblocks"),description:Ye("Add some text to the header","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"nametag",attributes:{texttitle:{type:"array",source:"children",selector:"h1"},texttext:{type:"array",source:"children",selector:"p"},fontColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{fontColor:a}=t;return[(0,k.jsx)(Ke,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a font color:"}),(0,k.jsx)(Ze,{value:a,onChange:function(e){s({fontColor:e})}})]})}),(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Xe,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",value:t.texttitle,onChange:function(e){s({texttitle:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)(Xe,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",value:t.texttext,onChange:function(e){s({texttext:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})]},save:e=>{const{attributes:s,className:t}=e,{fontColor:n}=s;return(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Xe.Content,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",style:{color:n},value:s.texttitle}),(0,k.jsx)(Xe.Content,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",style:{color:n},value:s.texttext}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})}});const{__:ts}=wp.i18n,{registerBlockType:ns}=wp.blocks,{InnerBlocks:as}=wp.blockEditor;ns("nhsblocks/stripesblock",{title:ts("Stripes Block","nhsblocks"),description:ts("Outer block that allows alternate grey stripes. To be used with the Full Width for Stripes template ","nhsblocks"),category:"nhsblocks",icon:"menu-alt",attributes:{},example:{innerBlocks:[{name:"nhsblocks/stripeblock",innerBlocks:[{name:"core/paragraph",attributes:{ 2 2 /* translators: example text. */ 3 3 content:ts("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/paragraph",attributes:{ -
nhsblocks/tags/1.3.23/nhsblocks.php
r3386349 r3469300 9 9 * Tested up to: 6.8.3 10 10 * 11 * Version: 1.3.2 211 * Version: 1.3.23 12 12 * Stable tag: 1.3.20 13 13 * -
nhsblocks/tags/1.3.23/readme.txt
r3386349 r3469300 6 6 Requires at least: 5.3 7 7 Tested up to: 6.8.3 8 Stable tag: 1.3.2 28 Stable tag: 1.3.23 9 9 Requires PHP: 5.6 10 10 License: GPLv3 or later … … 55 55 56 56 == Changelog == 57 58 = 1.3.23 = 59 * Security updates 57 60 58 61 = 1.3.22 = -
nhsblocks/tags/1.3.23/style.css
r3386349 r3469300 9 9 Tags: NHS, NHS Digital, NHS Frontend, National Health Service, Leadership Academy 10 10 Description: Gutenberg native custom blocks companion plugin for the NHS Nightingale theme (can also be standalone). 11 Version: 1.3.2 211 Version: 1.3.23 12 12 13 13 **********************************************************************************************/ -
nhsblocks/trunk/build/index.asset.php
r3386349 r3469300 1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime'), 'version' => ' d4cec148b032d467017e');1 <?php return array('dependencies' => array('lodash', 'react-jsx-runtime'), 'version' => '7c903c5bc532c052ab2b'); -
nhsblocks/trunk/build/index.js
r3386349 r3469300 1 (()=>{var e={574 :()=>{const{registerBlockStyle:e,unregisterBlockStyle:s}=wp.blocks;wp.domReady((()=>{s("core/image",["default","rounded"]),e("core/image",[{name:"nhsuk-image",label:"NHS Image",isDefault:!0},{name:"default",label:"Default"}]),s("core/table",["regular"]),e("core/table",[{name:"nhsuk-table-responsive",label:"NHS Table",isDefault:!0},{name:"default",label:"Default"}])}))}},s={};function t(n){var a=s[n];if(void 0!==a)return a.exports;var l=s[n]={exports:{}};return e[n](l,l.exports,t),l.exports}(()=>{"use strict";window.lodash;const e=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"59.000",height:"30"})),s=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),n=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),a=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"31.000",y:"20.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"29.000",height:"19"})),l=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),r=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),i=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"39.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),o=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"39.000",height:"30"})),c=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),h=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),d=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),{__}=wp.i18n,u=[{name:"fullwidth",label:__("Full Width","nhsblocks"),icon:e,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-full"}]]},{name:"twocols",label:__("Two Columns","nhsblocks"),isDefault:!0,icon:s,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threecols",label:__("Three Columns","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"twothreecols",label:__("Two Columns Then Three Columns","nhsblocks"),icon:r,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"threetwocols",label:__("Three Columns then Two Columns","nhsblocks"),icon:a,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threethreecols",label:__("Three Columns on Two Rows","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]}],k=window.ReactJSXRuntime,{__:m}=wp.i18n,{registerBlockType:p,createBlock:b}=wp.blocks,{RichText:g,InspectorControls:x,URLInputButton:v,ColorPalette:j,MediaUpload:_,InnerBlocks:w,__experimentalBlockVariationPicker:y}=wp.blockEditor,{useDispatch:N,useSelect:T}=wp.data;p("nhsblocks/dashboardnav",{title:m("Dashboard Navigation","nhsblocks"),category:"nhsblocks",icon:"tagcloud",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=N("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=T((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>b(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(w,{template:u})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(y,{variations:u,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-dashboard",children:(0,k.jsx)(w.Content,{})})})}}),p("nhsblocks/dashpanel",{title:m("Dashboard Region","nhsblocks"),description:m("Simple image background with text and link to give Dashboard navigation panel"),icon:"feedback",category:"nhsblocks",parent:["nhsblocks/dashboardnav"],attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l,panelTitle:r,panelLink:i}=t;return[(0,k.jsxs)(x,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this panel"}),(0,k.jsx)(v,{className:"nhsblocks-dropdown__input",label:m("Dashboard Link","nhsblocks"),onChange:e=>{s({panelLink:e})},url:i})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(_,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you choose an image above)"}),(0,k.jsx)(j,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("div",{className:`${n} nhsuk-panel-group__item`,children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g,{placeholder:m("Panel Title","nhsblocks"),value:r,onChange:e=>{s({panelTitle:e})}})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})]},save:e=>{const{attributes:{overlayColor:s,backgroundImage:t,panelTitle:n,panelLink:a}}=e;return(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:a,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${s}`},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g.Content,{value:n})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:n})]})})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:e.panelLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${e.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${e.overlayColor}`},children:[(0,k.jsxs)("h3",{className:"nhsuk-panel-with-label__label",children:["`$",e.panelTitle,"`"]}),(0,k.jsx)("img",{src:"/wp-content/themes/nightingale-2-0/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})})}]});const{__:f}=wp.i18n,{registerBlockType:C}=wp.blocks,{RichText:B,InnerBlocks:I}=wp.blockEditor;C("nhsblocks/dodont",{title:f("Do and Don't List","nhsblocks"),category:"nhsblocks",icon:"yes-alt",example:{attributes:{panelTitle:"Do and Dont List"},innerBlocks:[{name:"nhsblocks/doitem",attributes:{panelText:"This is an item to definitely do"}},{name:"nhsblocks/dontitem",attributes:{panelText:"This is an item to definitely NOT do"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B,{placeholder:f("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(I,{allowedBlocks:[]})})]})},save:e=>{const{attributes:{panelTitle:s,panelText:t}}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B.Content,{value:s})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(I.Content,{})})]})}}),C("nhsblocks/doitem",{title:f("List Item with Tick","nhsblocks"),category:"nhsblocks",icon:"yes",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}}),C("nhsblocks/dontitem",{title:f("List Item with Cross","nhsblocks"),category:"nhsblocks",icon:"no-alt",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}});const{__:L}=wp.i18n,{registerBlockType:E}=wp.blocks,{RichText:P,InspectorControls:S,BlockControls:A,BlockVerticalAlignmentToolbar:q,URLInputButton:R}=wp.blockEditor;E("nhsblocks/nhsbutton",{title:L("Button","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"green",label:L("Standard (Green)"),isDefault:!0},{name:"secondary",label:L("Secondary (Grey)")},{name:"reverse",label:L("Reverse (White)")}],supports:{align:!0},example:{attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",verticalAlignment:"left"}},attributes:{buttonLabel:{type:"string",source:"html",selector:".nhsuk-button"},buttonLink:{type:"string",source:"attribute",selector:"a.nhsuk-button",attribute:"href"},verticalAlignment:{type:"string"}},edit:e=>{const{attributes:{buttonLabel:s,buttonLink:t,verticalAlignment:n},className:a,setAttributes:l}=e;return[(0,k.jsx)(S,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this button by clicking the chain icon below."}),(0,k.jsx)(R,{className:"nhsblocks-dropdown__input",label:L("Button URL","nhsblocks"),onChange:e=>{l({buttonLink:e})},url:t})]})}),(0,k.jsx)(A,{children:(0,k.jsx)(q,{onChange:e=>{l({verticalAlignment:e})},value:n})}),(0,k.jsx)("div",{className:`${a} nhsuk-button`,children:(0,k.jsx)(P,{value:s,onChange:e=>{l({buttonLabel:e})},placeholder:"Button label"})})]},save:e=>{const{attributes:{buttonLabel:s,buttonLink:t}}=e;return(0,k.jsx)("a",{href:t,className:"nhsuk-button",children:(0,k.jsx)(P.Content,{value:s})})}});const{__:D}=wp.i18n,{registerBlockType:O}=wp.blocks,{RichText:$,InnerBlocks:H,InspectorControls:U,useBlockProps:V}=wp.blockEditor,{ToggleControl:Q,PanelBody:z,PanelRow:W,RadioControl:G,clientId:M}=wp.components,F=[["core/image",{align:"right",width:"150px"}]];O("nhsblocks/reveal1",{title:D("Simple Reveal","nhsblocks"),category:"nhsblocks",icon:"plus-alt",styles:[{name:"downarrow",label:D("Down Arrow"),isDefault:!0},{name:"expander",label:D("Plus Icon")}],example:{attributes:{revealTitle:"Expandable Region",revealText:"This is text inside an expandable region. It all shows up when this region is opened, but can also be minimised",className:"is-style-expander"}},attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=V(),{attributes:{revealTitle:t,revealText:n,withImage:a},className:l,setAttributes:r}=e;return[(0,k.jsx)(U,{children:(0,k.jsx)(z,{children:(0,k.jsx)(W,{children:(0,k.jsx)(Q,{label:"Include an image?",checked:a,onChange:e=>r({withImage:e})})})})}),(0,k.jsxs)("details",{className:`${l} nhsuk-details newstyle`,open:!0,children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($,{placeholder:D("Reveal Title","nhsblocks"),value:t,onChange:e=>{r({revealTitle:e})}})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H,{template:F}),(0,k.jsx)($,{...s,placeholder:D("Reveal Contents","nhsblocks"),onChange:e=>{r({revealText:e})},value:n})]})]})]},save:e=>{const s=V.save(),{attributes:{revealTitle:t,revealText:n,withImage:a}}=e;return(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($.Content,{value:t})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H.Content,{}),(0,k.jsx)($.Content,{...s,value:n})]})]})},deprecated:[{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})},{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})}]});const{__:Y}=wp.i18n,{registerBlockType:J}=wp.blocks,{RichText:X,InnerBlocks:K}=wp.blockEditor,Z=[["core/paragraph",{placeholder:"Panel Text"}],["nhsblocks/nhsbutton",{align:"right"}]];J("nhsblocks/panel1",{title:Y("Panel Region","nhsblocks"),description:Y("By default this block includes a title, block of text and button link. You can remove the button if you wish by clicking it then clicking three dots on the navigation bar at the top of the page then the bin","nhsblocks"),icon:"feedback",category:"nhsblocks",styles:[{name:"default",label:Y("Plain white panel"),isDefault:!0},{name:"panel-grey",label:Y("Grey")},{name:"panel-with-label",label:Y("With Label")}],example:{attributes:{panelTitle:"Example Panel",className:"is-style-panel-grey"},innerBlocks:[{name:"core/paragraph",attributes:{content:Y("This is the content of a panel block, and it has lots of useful information")}},{name:"nhsblocks/nhsbutton",attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",className:"is-style-secondary",align:"right"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-panel1 h2"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X,{placeholder:Y("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K,{template:Z})})]})})},save:e=>{const{attributes:{panelTitle:s,className:t}}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X.Content,{value:s})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K.Content,{})})]})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-panel",children:[(0,k.jsx)("h3",{children:(0,k.jsx)(X.Content,{value:e.panelTitle})}),(0,k.jsx)("div",{className:"paneltext",children:(0,k.jsx)(K.Content,{})})]})}]});const{__:ee}=wp.i18n,{registerBlockType:se}=wp.blocks,{RichText:te,InspectorControls:ne,BlockControls:ae,BlockVerticalAlignmentToolbar:le}=wp.blockEditor;se("nhsblocks/tags",{title:ee("Tag","nhsblocks"),description:ee("Tags are just used to indicate a status. Do not add links. Use adjectives rather than verbs for the names of your tags. Using a verb might make a user think that clicking on them will do something","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"blue",label:ee("Standard (Blue)"),isDefault:!0},{name:"white",label:ee("White")},{name:"grey",label:ee("Grey")},{name:"green",label:ee("Green")},{name:"aqua-green",label:ee("Aqua Green")},{name:"blue",label:ee("Light Blue")},{name:"purple",label:ee("Purple")},{name:"pink",label:ee("Pink")},{name:"red",label:ee("Red")},{name:"orange",label:ee("Orange")},{name:"yellow",label:ee("Yellow")}],supports:{align:!1},example:{attributes:{tagLabel:"New"}},attributes:{tagLabel:{type:"string",source:"html",selector:".nhsuk-tag"}},edit:e=>{const{attributes:{tagLabel:s},className:t,setAttributes:n}=e;return[(0,k.jsx)("strong",{className:`${t} nhsuk-tag`,children:(0,k.jsx)(te,{value:s,onChange:e=>{n({tagLabel:e})},placeholder:"Tag label"})})]},save:e=>{const{attributes:{tagLabel:s}}=e;return(0,k.jsx)("strong",{className:"nhsuk-tag",children:(0,k.jsx)(te.Content,{value:s})})}});const{__:re}=wp.i18n,{registerBlockType:ie}=wp.blocks,{URLInputButton:oe,RichText:ce,InnerBlocks:he,MediaUpload:de,InspectorControls:ue,useBlockProps:ke}=wp.blockEditor;ie("nhsblocks/promo1",{title:re("Promo Region","nhsblocks"),category:"nhsblocks",icon:"megaphone",styles:[{name:"default",label:re("Standard"),isDefault:!0},{name:"promo-small",label:re("Smaller Text")}],example:{attributes:{promoTitle:"Promo Box",promoText:"This is the content of the box to send users to your promoted page",promoLink:"https://www.nhs.uk",align:"center"},innerBlocks:[{name:"core/image",attributes:{url:"https://assets.nhs.uk/prod/images/A_0218_healthy-eating-main_BATM01_copy.width-690.jpg"}}]},attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__link"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},edit:e=>{const s=ke(),{attributes:{promoTitle:t,promoText:n,promoLink:a},className:l,setAttributes:r}=e;return(0,k.jsxs)("div",{className:`${l} nhsuk-card nhsuk-card--clickable`,children:[(0,k.jsx)(he,{allowedBlocks:["core/image"]}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsxs)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:[(0,k.jsx)(oe,{className:"nhsblocks-dropdown__input",label:re("Panel Link","nhsblocks"),onChange:e=>{r({promoLink:e})},url:a}),(0,k.jsx)(ce,{placeholder:re("Promo Title","nhsblocks"),value:t,onChange:e=>{r({promoTitle:e})}})]}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce,{...s,placeholder:re("Promo Contents","nhsblocks"),onChange:e=>{r({promoText:e})},value:n})})]})]})},save:e=>{const s=ke.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(he.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)("a",{href:a,className:"nhsuk-card__link",children:(0,k.jsx)(ce.Content,{value:t})})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce.Content,{...s,value:n})})]})]})},deprecated:[{attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__content .nhsuk-card__heading"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},save:e=>{const s=ke.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;var l=t.replace("</a>","").replace("</a>","</a></a>");return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(he.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)(ce.Content,{...s,value:l})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce.Content,{...s,value:n})})]})]})}},{attributes:{promoTitle:{type:"string",source:"html",selector:".nhsuk-promo__heading"},promoText:{type:"string",source:"html",selector:".nhsuk-promo__description"},promoLink:{type:"string",source:"attribute",selector:".nhsuk-promo a",attribute:"href"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-promo",children:(0,k.jsx)("a",{href:e.promoLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-promo__content",children:[(0,k.jsx)(he.Content,{}),(0,k.jsx)("h3",{className:"nhsuk-promo__heading",children:e.promoTitle}),(0,k.jsx)("div",{className:"nhsuk-promo__description",children:e.promoText})]})})})}]});const{__:me}=wp.i18n,pe=[["nhsblocks/promo1"]],be=[{name:"twocolspro",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onehalfpro"]]},{name:"threecolspro",label:me("Three Columns Promos","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"]]},{name:"one3two3pro",label:me("One Third / Two Thirds Columns Promos","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/twothirdspro"]]},{name:"two3one3pro",label:me("Two Thirds / One Third Columns Promos","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/twothirdspro"],["nhsblocks/onethirdpro"]]},{name:"one4one2one4pro",label:me("One Quarter / One Half / One Quarter Columns Promos","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"]]},{name:"one4one4one2pro",label:me("One Quarter / One Quarter / One Half Columns Promos","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"]]},{name:"one2one4one4",label:me("One Half / One Quarter / One Quarter Columns Promos","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"]]}],{__:ge}=wp.i18n,{registerBlockType:xe,createBlock:ve}=wp.blocks,{InnerBlocks:je,__experimentalBlockVariationPicker:_e}=wp.blockEditor,{useDispatch:we,useSelect:ye}=wp.data;xe("nhsblocks/promogroup",{title:ge("Grouped Promos","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=we("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=ye((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ve(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(je,{template:be})}):(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(_e,{variations:be,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(je.Content,{})})}}),xe("nhsblocks/onehalfpro",{title:ge("One Half Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/onethirdpro",{title:ge("One Third Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/onequarterpro",{title:ge("One Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/twothirdspro",{title:ge("Two Thirds Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/threequarterspro",{title:ge("Three Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})});const{__:Ne}=wp.i18n,{registerBlockType:Te}=wp.blocks,{RichText:fe,useBlockProps:Ce}=wp.blockEditor;Te("nhsblocks/quote1",{title:Ne("Simple Quote","nhsblocks"),category:"nhsblocks",icon:"format-quote",styles:[{name:"standard",label:Ne("Standard"),isDefault:!0},{name:"quote-reverse",label:Ne("Inverse")}],example:{attributes:{quoteName:"Tony Blacker",quoteText:"Nightingale is an incredibly flexible theme. With NHSBlocks added in, it is amazing."}},attributes:{quoteName:{type:"string",source:"html",selector:".nhsuk-inset-text__quote-attribution"},quoteText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-inset-text__quote"}},edit:e=>{const s=Ce(),{attributes:{quoteName:t,quoteText:n},className:a,setAttributes:l}=e;return(0,k.jsxs)("div",{className:`${a} nhsuk-inset-text`,children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(fe,{...s,placeholder:Ne("Quote","nhsblocks"),onChange:e=>{l({quoteText:e})},value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(fe,{placeholder:Ne("Quote Name","nhsblocks"),value:t,onChange:e=>{l({quoteName:e})}})})]})},save:e=>{const s=Ce.save(),{attributes:{quoteName:t,quoteText:n}}=e;return(0,k.jsxs)("div",{className:"nhsuk-inset-text",children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(fe.Content,{...s,value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(fe.Content,{value:t})})]})}});const{__:Be}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{RichText:Le,InnerBlocks:Ee,InspectorControls:Pe,useBlockProps:Se}=wp.blockEditor,{ToggleControl:Ae,PanelBody:qe,PanelRow:Re,RadioControl:De}=wp.components,{withState:Oe}=wp.compose,$e=[["core/image",{align:"right",width:150}]];Ie("nhsblocks/card1",{title:Be("Card Region","nhsblocks"),category:"nhsblocks",icon:"category",example:{attributes:{cardTitle:"This is a card",cardText:"This is the content of the card"},innerBlocks:[{name:"core/image",attributes:{align:"right",width:150}}]},attributes:{innerBlocks_length:{type:"number",default:0},cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=Se(),{attributes:{cardTitle:t,cardText:n,withImage:a},clientId:l,className:r,setAttributes:i}=e;return[(0,k.jsx)(Pe,{children:(0,k.jsx)(qe,{children:(0,k.jsx)(Re,{children:(0,k.jsx)(Ae,{label:"Include an image?",checked:a,onChange:e=>i({withImage:e})})})})}),(0,k.jsxs)("div",{className:`${r} nhsuk-care-card`,children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le,{placeholder:Be("Card Title","nhsblocks"),value:t,onChange:e=>{i({cardTitle:e})}})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Ee,{template:$e}),(0,k.jsx)(Le,{...s,placeholder:Be("Card Contents","nhsblocks"),onChange:e=>{i({cardText:e})},value:n})]})]})]},save:e=>{const s=Se.save(),{attributes:{cardTitle:t,cardText:n,withImage:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:t})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Ee.Content,{}),(0,k.jsx)(Le.Content,{...s,value:n})]})]})},deprecated:[{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading","aria-level":"3",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--care",children:[(0,k.jsxs)("div",{className:"nhsuk-card--care__heading-container",children:[(0,k.jsx)("h2",{className:"nhsuk-card--care__heading",children:(0,k.jsx)("span",{role:"text",className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})}),(0,k.jsx)("span",{className:"nhsuk-card--care__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-card__content",children:(0,k.jsx)(Le.Content,{...Se.save(),multiline:"p",value:e.cardText})})]})}]}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"default",label:"Standard Blue",isDefault:!0}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"urgent",label:"Urgent (Red)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"immediate",label:"Immediate (Red and Black)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"warning-callout",label:"Warning Callout (Yellow)"});const{__:He}=wp.i18n,Ue=[{name:"twocols",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onehalf"]]},{name:"threecols",label:He("Three Columns Generic","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/onethird"],["nhsblocks/onethird"]]},{name:"one3two3",label:He("One Third / Two Thirds Columns Generic","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/twothirds"]]},{name:"two3one3",label:He("Two Thirds / One Third Columns Generic","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/twothirds"],["nhsblocks/onethird"]]},{name:"one4one2one4",label:He("One Quarter / One Half / One Quarter Columns Generic","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onehalf"],["nhsblocks/onequarter"]]},{name:"one4one4one2",label:He("One Quarter / One Quarter / One Half Columns Generic","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onequarter"],["nhsblocks/onehalf"]]},{name:"one2one4one4",label:He("One Half / One Quarter / One Quarter Columns Generic","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onequarter"],["nhsblocks/onequarter"]]}],{__:Ve}=wp.i18n,{registerBlockType:Qe,createBlock:ze}=wp.blocks,{InnerBlocks:We,__experimentalBlockVariationPicker:Ge}=wp.blockEditor,{useDispatch:Me,useSelect:Fe}=wp.data;Qe("nhsblocks/rowgroup",{title:Ve("Grouped Items","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=Me("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=Fe((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ze(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(We,{template:Ue})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(Ge,{variations:Ue,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(We.Content,{})})})}}),Qe("nhsblocks/onehalf",{title:Ve("One Half Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/onethird",{title:Ve("One Third Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/onequarter",{title:Ve("One Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/twothirds",{title:Ve("Two Thirds Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/threequarters",{title:Ve("Three Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(We.Content,{})})}});const{__:Ye}=wp.i18n,{registerBlockType:Je}=wp.blocks,{RichText:Xe,InspectorControls:Ke,ColorPalette:Ze,MediaUpload:es,InnerBlocks:ss}=wp.blockEditor;Je("nhsblocks/heroblock",{title:Ye("Hero Block","nhsblocks"),description:Ye("Full width zone, designed to go at the top of your page with an optional image background, texta area and call to action","nhsblocks"),category:"nhsblocks",icon:"schedule",example:{attributes:{backgroundImage:"https://assets.nhs.uk/prod/images/S_0818_homepage_hero_1_F0147446.width-1000.jpg"},innerBlocks:[{name:"nhsblocks/heroinner",attributes:{texttitle:"This is a title",texttext:"This is a subtitle"}}]},attributes:{overlayColor:{type:"string",default:"#005eb8"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l}=t;return[(0,k.jsxs)(Ke,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(es,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you chose an image above)"}),(0,k.jsx)(Ze,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("section",{className:`${n} nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description`,style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ss,{template:[["nhsblocks/heroinner",{}]]})})})})})})]},save:e=>{const{attributes:s,className:t}=e,{overlayColor:n,backgroundImage:a}=s;return(0,k.jsx)("section",{className:"nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description",style:{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${n}`},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ss.Content,{})})})})})})}}),Je("nhsblocks/heroinner",{title:Ye("Hero Block Inner Text","nhsblocks"),description:Ye("Add some text to the header","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"nametag",attributes:{texttitle:{type:"array",source:"children",selector:"h1"},texttext:{type:"array",source:"children",selector:"p"},fontColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{fontColor:a}=t;return[(0,k.jsx)(Ke,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a font color:"}),(0,k.jsx)(Ze,{value:a,onChange:function(e){s({fontColor:e})}})]})}),(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Xe,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",value:t.texttitle,onChange:function(e){s({texttitle:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)(Xe,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",value:t.texttext,onChange:function(e){s({texttext:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})]},save:e=>{const{attributes:s,className:t}=e,{fontColor:n}=s;return(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Xe.Content,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",style:{color:n},value:s.texttitle}),(0,k.jsx)(Xe.Content,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",style:{color:n},value:s.texttext}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})}});const{__:ts}=wp.i18n,{registerBlockType:ns}=wp.blocks,{InnerBlocks:as}=wp.blockEditor;ns("nhsblocks/stripesblock",{title:ts("Stripes Block","nhsblocks"),description:ts("Outer block that allows alternate grey stripes. To be used with the Full Width for Stripes template ","nhsblocks"),category:"nhsblocks",icon:"menu-alt",attributes:{},example:{innerBlocks:[{name:"nhsblocks/stripeblock",innerBlocks:[{name:"core/paragraph",attributes:{1 (()=>{var e={574(){const{registerBlockStyle:e,unregisterBlockStyle:s}=wp.blocks;wp.domReady((()=>{s("core/image",["default","rounded"]),e("core/image",[{name:"nhsuk-image",label:"NHS Image",isDefault:!0},{name:"default",label:"Default"}]),s("core/table",["regular"]),e("core/table",[{name:"nhsuk-table-responsive",label:"NHS Table",isDefault:!0},{name:"default",label:"Default"}])}))}},s={};function t(n){var a=s[n];if(void 0!==a)return a.exports;var l=s[n]={exports:{}};return e[n](l,l.exports,t),l.exports}(()=>{"use strict";window.lodash;const e=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"59.000",height:"30"})),s=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),n=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),a=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"31.000",y:"20.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"29.000",height:"19"})),l=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),r=wp.element.createElement("svg",{width:60,height:40},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"19"}),wp.element.createElement("rect",{x:"41.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"21.000",y:"20.000",width:"19.000",height:"19"}),wp.element.createElement("rect",{x:"0.000",y:"20.000",width:"19.000",height:"19"})),i=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"21.000",y:"0.000",width:"39.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"19.000",height:"30"})),o=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"41.000",y:"0.000",width:"19.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"39.000",height:"30"})),c=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"29.000",height:"30"})),h=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"46.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),d=wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"31.000",y:"0.000",width:"29.000",height:"30"}),wp.element.createElement("rect",{x:"16.000",y:"0.000",width:"14.000",height:"30"}),wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"14.000",height:"30"})),{__}=wp.i18n,u=[{name:"fullwidth",label:__("Full Width","nhsblocks"),icon:e,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-full"}]]},{name:"twocols",label:__("Two Columns","nhsblocks"),isDefault:!0,icon:s,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threecols",label:__("Three Columns","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"twothreecols",label:__("Two Columns Then Three Columns","nhsblocks"),icon:r,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]},{name:"threetwocols",label:__("Three Columns then Two Columns","nhsblocks"),icon:a,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threethreecols",label:__("Three Columns on Two Rows","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-third"}]]}],k=window.ReactJSXRuntime,{__:m}=wp.i18n,{registerBlockType:p,createBlock:b}=wp.blocks,{RichText:g,InspectorControls:x,URLInputButton:v,ColorPalette:j,MediaUpload:_,InnerBlocks:w,__experimentalBlockVariationPicker:y}=wp.blockEditor,{useDispatch:N,useSelect:T}=wp.data;p("nhsblocks/dashboardnav",{title:m("Dashboard Navigation","nhsblocks"),category:"nhsblocks",icon:"tagcloud",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=N("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=T((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>b(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(w,{template:u})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard",children:(0,k.jsx)(y,{variations:u,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-dashboard",children:(0,k.jsx)(w.Content,{})})})}}),p("nhsblocks/dashpanel",{title:m("Dashboard Region","nhsblocks"),description:m("Simple image background with text and link to give Dashboard navigation panel"),icon:"feedback",category:"nhsblocks",parent:["nhsblocks/dashboardnav"],attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l,panelTitle:r,panelLink:i}=t;return[(0,k.jsxs)(x,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this panel"}),(0,k.jsx)(v,{className:"nhsblocks-dropdown__input",label:m("Dashboard Link","nhsblocks"),onChange:e=>{s({panelLink:e})},url:i})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(_,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you choose an image above)"}),(0,k.jsx)(j,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("div",{className:`${n} nhsuk-panel-group__item`,children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g,{placeholder:m("Panel Title","nhsblocks"),value:r,onChange:e=>{s({panelTitle:e})}})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})]},save:e=>{const{attributes:{overlayColor:s,backgroundImage:t,panelTitle:n,panelLink:a}}=e;return(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:a,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${s}`},children:[(0,k.jsx)("h3",{className:"nhsuk-panel-with-label__label",children:(0,k.jsx)(g.Content,{value:n})}),(0,k.jsx)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:n})]})})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"},panelLink:{type:"string",source:"attribute",selector:".nhsuk-promo__link-wrapper",attribute:"href"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"},overlayColor:{type:"string",default:"#ffffff"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-panel-group__item",children:(0,k.jsx)("a",{href:e.panelLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${e.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${e.overlayColor}`},children:[(0,k.jsxs)("h3",{className:"nhsuk-panel-with-label__label",children:["`$",e.panelTitle,"`"]}),(0,k.jsx)("img",{src:"/wp-content/themes/nightingale-2-0/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})]})})})}]});const{__:f}=wp.i18n,{registerBlockType:C}=wp.blocks,{RichText:B,InnerBlocks:I}=wp.blockEditor;C("nhsblocks/dodont",{title:f("Do and Don't List","nhsblocks"),category:"nhsblocks",icon:"yes-alt",example:{attributes:{panelTitle:"Do and Dont List"},innerBlocks:[{name:"nhsblocks/doitem",attributes:{panelText:"This is an item to definitely do"}},{name:"nhsblocks/dontitem",attributes:{panelText:"This is an item to definitely NOT do"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B,{placeholder:f("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(I,{allowedBlocks:[]})})]})},save:e=>{const{attributes:{panelTitle:s,panelText:t}}=e;return(0,k.jsxs)("div",{className:"nhsuk-do-dont-list",children:[(0,k.jsx)("h3",{className:"nhsuk-do-dont-list__label",children:(0,k.jsx)(B.Content,{value:s})}),(0,k.jsx)("ul",{className:"nhsuk-list nhsuk-list--cross",children:(0,k.jsx)(I.Content,{})})]})}}),C("nhsblocks/doitem",{title:f("List Item with Tick","nhsblocks"),category:"nhsblocks",icon:"yes",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsx)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,k.jsx)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}}),C("nhsblocks/dontitem",{title:f("List Item with Cross","nhsblocks"),category:"nhsblocks",icon:"no-alt",parent:["nhsblocks/dodont"],attributes:{panelText:{type:"string",source:"html",selector:"span"}},edit:e=>{const{attributes:{panelText:s},setAttributes:t}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B,{placeholder:f("Text","nhsblocks"),value:s,onChange:e=>{t({panelText:e})}})})]})},save:e=>{const{attributes:{panelText:s}}=e;return(0,k.jsxs)("li",{children:[(0,k.jsxs)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,k.jsx)("path",{d:"M17 18.5c-.4 0-.8-.1-1.1-.4l-10-10c-.6-.6-.6-1.6 0-2.1.6-.6 1.5-.6 2.1 0l10 10c.6.6.6 1.5 0 2.1-.3.3-.6.4-1 .4z"}),(0,k.jsx)("path",{d:"M7 18.5c-.4 0-.8-.1-1.1-.4-.6-.6-.6-1.5 0-2.1l10-10c.6-.6 1.5-.6 2.1 0 .6.6.6 1.5 0 2.1l-10 10c-.3.3-.6.4-1 .4z"})]}),(0,k.jsx)("span",{children:(0,k.jsx)(B.Content,{value:s})})]})}});const{__:L}=wp.i18n,{registerBlockType:E}=wp.blocks,{RichText:P,InspectorControls:S,BlockControls:A,BlockVerticalAlignmentToolbar:q,URLInputButton:R}=wp.blockEditor;E("nhsblocks/nhsbutton",{title:L("Button","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"green",label:L("Standard (Green)"),isDefault:!0},{name:"secondary",label:L("Secondary (Grey)")},{name:"reverse",label:L("Reverse (White)")}],supports:{align:!0},example:{attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",verticalAlignment:"left"}},attributes:{buttonLabel:{type:"string",source:"html",selector:".nhsuk-button"},buttonLink:{type:"string",source:"attribute",selector:"a.nhsuk-button",attribute:"href"},verticalAlignment:{type:"string"}},edit:e=>{const{attributes:{buttonLabel:s,buttonLink:t,verticalAlignment:n},className:a,setAttributes:l}=e;return[(0,k.jsx)(S,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Add a link for this button by clicking the chain icon below."}),(0,k.jsx)(R,{className:"nhsblocks-dropdown__input",label:L("Button URL","nhsblocks"),onChange:e=>{l({buttonLink:e})},url:t})]})}),(0,k.jsx)(A,{children:(0,k.jsx)(q,{onChange:e=>{l({verticalAlignment:e})},value:n})}),(0,k.jsx)("div",{className:`${a} nhsuk-button`,children:(0,k.jsx)(P,{value:s,onChange:e=>{l({buttonLabel:e})},placeholder:"Button label"})})]},save:e=>{const{attributes:{buttonLabel:s,buttonLink:t}}=e;return(0,k.jsx)("a",{href:t,className:"nhsuk-button",children:(0,k.jsx)(P.Content,{value:s})})}});const{__:D}=wp.i18n,{registerBlockType:O}=wp.blocks,{RichText:$,InnerBlocks:H,InspectorControls:U,useBlockProps:V}=wp.blockEditor,{ToggleControl:Q,PanelBody:z,PanelRow:W,RadioControl:G,clientId:M}=wp.components,F=[["core/image",{align:"right",width:"150px"}]];O("nhsblocks/reveal1",{title:D("Simple Reveal","nhsblocks"),category:"nhsblocks",icon:"plus-alt",styles:[{name:"downarrow",label:D("Down Arrow"),isDefault:!0},{name:"expander",label:D("Plus Icon")}],example:{attributes:{revealTitle:"Expandable Region",revealText:"This is text inside an expandable region. It all shows up when this region is opened, but can also be minimised",className:"is-style-expander"}},attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=V(),{attributes:{revealTitle:t,revealText:n,withImage:a},className:l,setAttributes:r}=e;return[(0,k.jsx)(U,{children:(0,k.jsx)(z,{children:(0,k.jsx)(W,{children:(0,k.jsx)(Q,{label:"Include an image?",checked:a,onChange:e=>r({withImage:e})})})})}),(0,k.jsxs)("details",{className:`${l} nhsuk-details newstyle`,open:!0,children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($,{placeholder:D("Reveal Title","nhsblocks"),value:t,onChange:e=>{r({revealTitle:e})}})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H,{template:F}),(0,k.jsx)($,{...s,placeholder:D("Reveal Contents","nhsblocks"),onChange:e=>{r({revealText:e})},value:n})]})]})]},save:e=>{const s=V.save(),{attributes:{revealTitle:t,revealText:n,withImage:a}}=e;return(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsx)("span",{className:"nhsuk-details__summary-text",children:(0,k.jsx)($.Content,{value:t})})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:[!0===a&&(0,k.jsx)(H.Content,{}),(0,k.jsx)($.Content,{...s,value:n})]})]})},deprecated:[{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})},{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:e})=>(0,k.jsxs)("details",{className:"nhsuk-details",children:[(0,k.jsx)("summary",{className:"nhsuk-details__summary",role:"button",children:(0,k.jsxs)("span",{className:"nhsuk-details__summary-text",children:["`$",e.revealTitle,"`"]})}),(0,k.jsxs)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false",children:["`$",e.revealText,"`"]})]})}]});const{__:Y}=wp.i18n,{registerBlockType:J}=wp.blocks,{RichText:X,InnerBlocks:K}=wp.blockEditor,Z=[["core/paragraph",{placeholder:"Panel Text"}],["nhsblocks/nhsbutton",{align:"right"}]];J("nhsblocks/panel1",{title:Y("Panel Region","nhsblocks"),description:Y("By default this block includes a title, block of text and button link. You can remove the button if you wish by clicking it then clicking three dots on the navigation bar at the top of the page then the bin","nhsblocks"),icon:"feedback",category:"nhsblocks",styles:[{name:"default",label:Y("Plain white panel"),isDefault:!0},{name:"panel-grey",label:Y("Grey")},{name:"panel-with-label",label:Y("With Label")}],example:{attributes:{panelTitle:"Example Panel",className:"is-style-panel-grey"},innerBlocks:[{name:"core/paragraph",attributes:{content:Y("This is the content of a panel block, and it has lots of useful information")}},{name:"nhsblocks/nhsbutton",attributes:{buttonLabel:"NHS styled button",buttonLink:"https://www.nhs.uk",className:"is-style-secondary",align:"right"}}]},attributes:{panelTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-panel1 h2"}},edit:e=>{const{attributes:{panelTitle:s},className:t,setAttributes:n}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X,{placeholder:Y("Panel Title","nhsblocks"),value:s,onChange:e=>{n({panelTitle:e})}})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K,{template:Z})})]})})},save:e=>{const{attributes:{panelTitle:s,className:t}}=e;return(0,k.jsx)("div",{className:`${t} nhsuk-card`,children:(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{children:(0,k.jsx)(X.Content,{value:s})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(K.Content,{})})]})})},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-panel",children:[(0,k.jsx)("h3",{children:(0,k.jsx)(X.Content,{value:e.panelTitle})}),(0,k.jsx)("div",{className:"paneltext",children:(0,k.jsx)(K.Content,{})})]})}]});const{__:ee}=wp.i18n,{registerBlockType:se}=wp.blocks,{RichText:te,InspectorControls:ne,BlockControls:ae,BlockVerticalAlignmentToolbar:le}=wp.blockEditor;se("nhsblocks/tags",{title:ee("Tag","nhsblocks"),description:ee("Tags are just used to indicate a status. Do not add links. Use adjectives rather than verbs for the names of your tags. Using a verb might make a user think that clicking on them will do something","nhsblocks"),category:"nhsblocks",icon:"admin-links",styles:[{name:"blue",label:ee("Standard (Blue)"),isDefault:!0},{name:"white",label:ee("White")},{name:"grey",label:ee("Grey")},{name:"green",label:ee("Green")},{name:"aqua-green",label:ee("Aqua Green")},{name:"blue",label:ee("Light Blue")},{name:"purple",label:ee("Purple")},{name:"pink",label:ee("Pink")},{name:"red",label:ee("Red")},{name:"orange",label:ee("Orange")},{name:"yellow",label:ee("Yellow")}],supports:{align:!1},example:{attributes:{tagLabel:"New"}},attributes:{tagLabel:{type:"string",source:"html",selector:".nhsuk-tag"}},edit:e=>{const{attributes:{tagLabel:s},className:t,setAttributes:n}=e;return[(0,k.jsx)("strong",{className:`${t} nhsuk-tag`,children:(0,k.jsx)(te,{value:s,onChange:e=>{n({tagLabel:e})},placeholder:"Tag label"})})]},save:e=>{const{attributes:{tagLabel:s}}=e;return(0,k.jsx)("strong",{className:"nhsuk-tag",children:(0,k.jsx)(te.Content,{value:s})})}});const{__:re}=wp.i18n,{registerBlockType:ie}=wp.blocks,{URLInputButton:oe,RichText:ce,InnerBlocks:he,MediaUpload:de,InspectorControls:ue,useBlockProps:ke}=wp.blockEditor;ie("nhsblocks/promo1",{title:re("Promo Region","nhsblocks"),category:"nhsblocks",icon:"megaphone",styles:[{name:"default",label:re("Standard"),isDefault:!0},{name:"promo-small",label:re("Smaller Text")}],example:{attributes:{promoTitle:"Promo Box",promoText:"This is the content of the box to send users to your promoted page",promoLink:"https://www.nhs.uk",align:"center"},innerBlocks:[{name:"core/image",attributes:{url:"https://assets.nhs.uk/prod/images/A_0218_healthy-eating-main_BATM01_copy.width-690.jpg"}}]},attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__link"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},edit:e=>{const s=ke(),{attributes:{promoTitle:t,promoText:n,promoLink:a},className:l,setAttributes:r}=e;return(0,k.jsxs)("div",{className:`${l} nhsuk-card nhsuk-card--clickable`,children:[(0,k.jsx)(he,{allowedBlocks:["core/image"]}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsxs)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:[(0,k.jsx)(oe,{className:"nhsblocks-dropdown__input",label:re("Panel Link","nhsblocks"),onChange:e=>{r({promoLink:e})},url:a}),(0,k.jsx)(ce,{placeholder:re("Promo Title","nhsblocks"),value:t,onChange:e=>{r({promoTitle:e})}})]}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce,{...s,placeholder:re("Promo Contents","nhsblocks"),onChange:e=>{r({promoText:e})},value:n})})]})]})},save:e=>{const s=ke.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(he.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)("a",{href:a,className:"nhsuk-card__link",children:(0,k.jsx)(ce.Content,{value:t})})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce.Content,{...s,value:n})})]})]})},deprecated:[{attributes:{promoTitle:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__content .nhsuk-card__heading"},promoText:{type:"string",source:"html",selector:".wp-block-nhsblocks-promo1 .nhsuk-card__description"},promoLink:{type:"string",source:"attribute",selector:".wp-block-nhsblocks-promo1 a.nhsuk-card__link",attribute:"href"}},save:e=>{const s=ke.save(),{attributes:{promoTitle:t,promoText:n,promoLink:a}}=e;var l=t.replace("</a>","").replace("</a>","</a></a>");return(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--clickable",children:[(0,k.jsx)(he.Content,{}),(0,k.jsxs)("div",{className:"nhsuk-card__content",children:[(0,k.jsx)("h2",{className:"nhsuk-card__heading nhsuk-heading-m",children:(0,k.jsx)(ce.Content,{...s,value:l})}),(0,k.jsx)("div",{className:"nhsuk-card__description",children:(0,k.jsx)(ce.Content,{...s,value:n})})]})]})}},{attributes:{promoTitle:{type:"string",source:"html",selector:".nhsuk-promo__heading"},promoText:{type:"string",source:"html",selector:".nhsuk-promo__description"},promoLink:{type:"string",source:"attribute",selector:".nhsuk-promo a",attribute:"href"}},save:({attributes:e})=>(0,k.jsx)("div",{className:"nhsuk-promo",children:(0,k.jsx)("a",{href:e.promoLink,className:"nhsuk-promo__link-wrapper",children:(0,k.jsxs)("div",{className:"nhsuk-promo__content",children:[(0,k.jsx)(he.Content,{}),(0,k.jsx)("h3",{className:"nhsuk-promo__heading",children:e.promoTitle}),(0,k.jsx)("div",{className:"nhsuk-promo__description",children:e.promoText})]})})})}]});const{__:me}=wp.i18n,pe=[["nhsblocks/promo1"]],be=[{name:"twocolspro",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onehalfpro"]]},{name:"threecolspro",label:me("Three Columns Promos","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"]]},{name:"one3two3pro",label:me("One Third / Two Thirds Columns Promos","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/twothirdspro"]]},{name:"two3one3pro",label:me("Two Thirds / One Third Columns Promos","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/twothirdspro"],["nhsblocks/onethirdpro"]]},{name:"one4one2one4pro",label:me("One Quarter / One Half / One Quarter Columns Promos","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"]]},{name:"one4one4one2pro",label:me("One Quarter / One Quarter / One Half Columns Promos","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"]]},{name:"one2one4one4",label:me("One Half / One Quarter / One Quarter Columns Promos","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"]]}],{__:ge}=wp.i18n,{registerBlockType:xe,createBlock:ve}=wp.blocks,{InnerBlocks:je,__experimentalBlockVariationPicker:_e}=wp.blockEditor,{useDispatch:we,useSelect:ye}=wp.data;xe("nhsblocks/promogroup",{title:ge("Grouped Promos","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=we("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=ye((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ve(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(je,{template:be})}):(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(_e,{variations:be,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row nhsuk-card-group",children:(0,k.jsx)(je.Content,{})})}}),xe("nhsblocks/onehalfpro",{title:ge("One Half Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/onethirdpro",{title:ge("One Third Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/onequarterpro",{title:ge("One Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/twothirdspro",{title:ge("Two Thirds Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})}),xe("nhsblocks/threequarterspro",{title:ge("Three Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(je,{template:pe,templateLock:"all"})})},save:e=>(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item",children:(0,k.jsx)(je.Content,{})})});const{__:Ne}=wp.i18n,{registerBlockType:Te}=wp.blocks,{RichText:fe,useBlockProps:Ce}=wp.blockEditor;Te("nhsblocks/quote1",{title:Ne("Simple Quote","nhsblocks"),category:"nhsblocks",icon:"format-quote",styles:[{name:"standard",label:Ne("Standard"),isDefault:!0},{name:"quote-reverse",label:Ne("Inverse")}],example:{attributes:{quoteName:"Tony Blacker",quoteText:"Nightingale is an incredibly flexible theme. With NHSBlocks added in, it is amazing."}},attributes:{quoteName:{type:"string",source:"html",selector:".nhsuk-inset-text__quote-attribution"},quoteText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-inset-text__quote"}},edit:e=>{const s=Ce(),{attributes:{quoteName:t,quoteText:n},className:a,setAttributes:l}=e;return(0,k.jsxs)("div",{className:`${a} nhsuk-inset-text`,children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(fe,{...s,placeholder:Ne("Quote","nhsblocks"),onChange:e=>{l({quoteText:e})},value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(fe,{placeholder:Ne("Quote Name","nhsblocks"),value:t,onChange:e=>{l({quoteName:e})}})})]})},save:e=>{const s=Ce.save(),{attributes:{quoteName:t,quoteText:n}}=e;return(0,k.jsxs)("div",{className:"nhsuk-inset-text",children:[(0,k.jsxs)("span",{className:"nhsuk-u-visually-hidden",children:["Quote / Testimonial:"," "]}),(0,k.jsx)("div",{className:"nhsuk-inset-text__quote",children:(0,k.jsx)(fe.Content,{...s,value:n})}),(0,k.jsx)("span",{className:"nhsuk-inset-text__quote-attribution",children:(0,k.jsx)(fe.Content,{value:t})})]})}});const{__:Be}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{RichText:Le,InnerBlocks:Ee,InspectorControls:Pe,useBlockProps:Se}=wp.blockEditor,{ToggleControl:Ae,PanelBody:qe,PanelRow:Re,RadioControl:De}=wp.components,{withState:Oe}=wp.compose,$e=[["core/image",{align:"right",width:150}]];Ie("nhsblocks/card1",{title:Be("Card Region","nhsblocks"),category:"nhsblocks",icon:"category",example:{attributes:{cardTitle:"This is a card",cardText:"This is the content of the card"},innerBlocks:[{name:"core/image",attributes:{align:"right",width:150}}]},attributes:{innerBlocks_length:{type:"number",default:0},cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"},withImage:{type:"boolean",default:!1}},edit:e=>{const s=Se(),{attributes:{cardTitle:t,cardText:n,withImage:a},clientId:l,className:r,setAttributes:i}=e;return[(0,k.jsx)(Pe,{children:(0,k.jsx)(qe,{children:(0,k.jsx)(Re,{children:(0,k.jsx)(Ae,{label:"Include an image?",checked:a,onChange:e=>i({withImage:e})})})})}),(0,k.jsxs)("div",{className:`${r} nhsuk-care-card`,children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le,{placeholder:Be("Card Title","nhsblocks"),value:t,onChange:e=>{i({cardTitle:e})}})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Ee,{template:$e}),(0,k.jsx)(Le,{...s,placeholder:Be("Card Contents","nhsblocks"),onChange:e=>{i({cardText:e})},value:n})]})]})]},save:e=>{const s=Se.save(),{attributes:{cardTitle:t,cardText:n,withImage:a}}=e;return(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:t})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsxs)("div",{className:"nhsuk-care-card__content",children:[!0===a&&(0,k.jsx)(Ee.Content,{}),(0,k.jsx)(Le.Content,{...s,value:n})]})]})},deprecated:[{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading","aria-level":"3",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"text",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-care-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type",children:[(0,k.jsxs)("div",{className:"nhsuk-care-card__heading-container",children:[(0,k.jsx)("h3",{className:"nhsuk-care-card__heading",children:(0,k.jsxs)("span",{role:"heading",children:[(0,k.jsx)("span",{className:"nhsuk-u-visually-hidden",children:"Non-urgent advice: "}),(0,k.jsx)("span",{className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})]})}),(0,k.jsx)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-care-card__content",children:(0,k.jsx)(Le.Content,{multiline:"p",value:e.cardText})})]})},{attributes:{cardTitle:{type:"string",source:"html",selector:".nhsuk-care-card__heading-text"},cardText:{type:"array",source:"children",multiline:"p",selector:".nhsuk-card__content"}},save:({attributes:e})=>(0,k.jsxs)("div",{className:"nhsuk-card nhsuk-card--care",children:[(0,k.jsxs)("div",{className:"nhsuk-card--care__heading-container",children:[(0,k.jsx)("h2",{className:"nhsuk-card--care__heading",children:(0,k.jsx)("span",{role:"text",className:"nhsuk-care-card__heading-text",children:(0,k.jsx)(Le.Content,{value:e.cardTitle})})}),(0,k.jsx)("span",{className:"nhsuk-card--care__arrow","aria-hidden":"true"})]}),(0,k.jsx)("div",{className:"nhsuk-card__content",children:(0,k.jsx)(Le.Content,{...Se.save(),multiline:"p",value:e.cardText})})]})}]}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"default",label:"Standard Blue",isDefault:!0}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"urgent",label:"Urgent (Red)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"immediate",label:"Immediate (Red and Black)"}),wp.blocks.registerBlockStyle("nhsblocks/card1",{name:"warning-callout",label:"Warning Callout (Yellow)"});const{__:He}=wp.i18n,Ue=[{name:"twocols",label:"nhsblocks",isDefault:!0,icon:s,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onehalf"]]},{name:"threecols",label:He("Three Columns Generic","nhsblocks"),icon:n,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/onethird"],["nhsblocks/onethird"]]},{name:"one3two3",label:He("One Third / Two Thirds Columns Generic","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/twothirds"]]},{name:"two3one3",label:He("Two Thirds / One Third Columns Generic","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/twothirds"],["nhsblocks/onethird"]]},{name:"one4one2one4",label:He("One Quarter / One Half / One Quarter Columns Generic","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onehalf"],["nhsblocks/onequarter"]]},{name:"one4one4one2",label:He("One Quarter / One Quarter / One Half Columns Generic","nhsblocks"),icon:d,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onequarter"],["nhsblocks/onehalf"]]},{name:"one2one4one4",label:He("One Half / One Quarter / One Quarter Columns Generic","nhsblocks"),icon:c,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onequarter"],["nhsblocks/onequarter"]]}],{__:Ve}=wp.i18n,{registerBlockType:Qe,createBlock:ze}=wp.blocks,{InnerBlocks:We,__experimentalBlockVariationPicker:Ge}=wp.blockEditor,{useDispatch:Me,useSelect:Fe}=wp.data;Qe("nhsblocks/rowgroup",{title:Ve("Grouped Items","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:e=>{const{clientId:s,name:t}=e,{attributes:{template:n},setAttributes:a}=e,{replaceInnerBlocks:l}=Me("core/block-editor"),{blockType:r,defaultVariation:i,hasInnerBlocks:o,variations:c}=Fe((e=>{const{getBlockVariations:n,getBlockType:a,getDefaultBlockVariation:l}=e("core/blocks");return{blockType:a(t),defaultVariation:l(t,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(s).length>0,variations:n(t,"block")}}),[s,t]),h=e=>e.map((([e,s,t=[]])=>ze(e,s,h(t))));return o?(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(We,{template:Ue})})}):(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(Ge,{variations:Ue,onSelect:s=>{s.attributes&&e.setAttributes(s.attributes),s.innerBlocks&&l(e.clientId,h(s.innerBlocks))}})})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full",children:(0,k.jsx)(We.Content,{})})})}}),Qe("nhsblocks/onehalf",{title:Ve("One Half Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-half",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/onethird",{title:Ve("One Third Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-third",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/onequarter",{title:Ve("One Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-one-quarter",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/twothirds",{title:Ve("Two Thirds Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(We.Content,{})})}}),Qe("nhsblocks/threequarters",{title:Ve("Three Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:e=>{const{attributes:{template:s},setAttributes:t}=e,n=null===s||!s;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(We,{template:n?null:s})})},save:e=>{const{attributes:{template:s}}=e;return(0,k.jsx)("div",{className:"nhsuk-grid-column-three-quarters",children:(0,k.jsx)(We.Content,{})})}});const{__:Ye}=wp.i18n,{registerBlockType:Je}=wp.blocks,{RichText:Xe,InspectorControls:Ke,ColorPalette:Ze,MediaUpload:es,InnerBlocks:ss}=wp.blockEditor;Je("nhsblocks/heroblock",{title:Ye("Hero Block","nhsblocks"),description:Ye("Full width zone, designed to go at the top of your page with an optional image background, texta area and call to action","nhsblocks"),category:"nhsblocks",icon:"schedule",example:{attributes:{backgroundImage:"https://assets.nhs.uk/prod/images/S_0818_homepage_hero_1_F0147446.width-1000.jpg"},innerBlocks:[{name:"nhsblocks/heroinner",attributes:{texttitle:"This is a title",texttext:"This is a subtitle"}}]},attributes:{overlayColor:{type:"string",default:"#005eb8"},backgroundImage:{type:"string",default:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{overlayColor:a,backgroundImage:l}=t;return[(0,k.jsxs)(Ke,{children:[(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a background image:"}),(0,k.jsx)(es,{onSelect:function(e){s({backgroundImage:e.sizes.full.url})},type:"image",value:l,render:({open:e})=>(0,k.jsx)("button",{className:"button button-primary button-hero",onClick:e,children:"Upload Image!"})})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"OR"})," Select a background color: ",(0,k.jsx)("br",{}),(0,k.jsx)("i",{children:"(this will be ignored if you chose an image above)"}),(0,k.jsx)(Ze,{value:a,onChange:function(e){s({overlayColor:e})}})]})]}),(0,k.jsx)("section",{className:`${n} nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description`,style:{backgroundColor:`${a}`,backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ss,{template:[["nhsblocks/heroinner",{}]]})})})})})})]},save:e=>{const{attributes:s,className:t}=e,{overlayColor:n,backgroundImage:a}=s;return(0,k.jsx)("section",{className:"nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description",style:{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${n}`},children:(0,k.jsx)("div",{className:"nhsuk-hero__overlay",children:(0,k.jsx)("div",{className:"nhsuk-width-container",children:(0,k.jsx)("div",{className:"nhsuk-grid-row",children:(0,k.jsx)("div",{className:"nhsuk-grid-column-two-thirds",children:(0,k.jsx)(ss.Content,{})})})})})})}}),Je("nhsblocks/heroinner",{title:Ye("Hero Block Inner Text","nhsblocks"),description:Ye("Add some text to the header","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"nametag",attributes:{texttitle:{type:"array",source:"children",selector:"h1"},texttext:{type:"array",source:"children",selector:"p"},fontColor:{type:"string",default:"#ffffff"}},edit:e=>{const{setAttributes:s,attributes:t,className:n}=e,{fontColor:a}=t;return[(0,k.jsx)(Ke,{children:(0,k.jsxs)("div",{children:[(0,k.jsx)("strong",{children:"Select a font color:"}),(0,k.jsx)(Ze,{value:a,onChange:function(e){s({fontColor:e})}})]})}),(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Xe,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",value:t.texttitle,onChange:function(e){s({texttitle:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)(Xe,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",value:t.texttext,onChange:function(e){s({texttext:e})},placeholder:"Enter your text here!",style:{color:a}}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})]},save:e=>{const{attributes:s,className:t}=e,{fontColor:n}=s;return(0,k.jsxs)("div",{className:"nhsuk-hero-content",children:[(0,k.jsx)(Xe.Content,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",style:{color:n},value:s.texttitle}),(0,k.jsx)(Xe.Content,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",style:{color:n},value:s.texttext}),(0,k.jsx)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"})]})}});const{__:ts}=wp.i18n,{registerBlockType:ns}=wp.blocks,{InnerBlocks:as}=wp.blockEditor;ns("nhsblocks/stripesblock",{title:ts("Stripes Block","nhsblocks"),description:ts("Outer block that allows alternate grey stripes. To be used with the Full Width for Stripes template ","nhsblocks"),category:"nhsblocks",icon:"menu-alt",attributes:{},example:{innerBlocks:[{name:"nhsblocks/stripeblock",innerBlocks:[{name:"core/paragraph",attributes:{ 2 2 /* translators: example text. */ 3 3 content:ts("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/paragraph",attributes:{ -
nhsblocks/trunk/nhsblocks.php
r3386349 r3469300 9 9 * Tested up to: 6.8.3 10 10 * 11 * Version: 1.3.2 211 * Version: 1.3.23 12 12 * Stable tag: 1.3.20 13 13 * -
nhsblocks/trunk/readme.txt
r3386349 r3469300 6 6 Requires at least: 5.3 7 7 Tested up to: 6.8.3 8 Stable tag: 1.3.2 28 Stable tag: 1.3.23 9 9 Requires PHP: 5.6 10 10 License: GPLv3 or later … … 55 55 56 56 == Changelog == 57 58 = 1.3.23 = 59 * Security updates 57 60 58 61 = 1.3.22 = -
nhsblocks/trunk/style.css
r3386349 r3469300 9 9 Tags: NHS, NHS Digital, NHS Frontend, National Health Service, Leadership Academy 10 10 Description: Gutenberg native custom blocks companion plugin for the NHS Nightingale theme (can also be standalone). 11 Version: 1.3.2 211 Version: 1.3.23 12 12 13 13 **********************************************************************************************/
Note: See TracChangeset
for help on using the changeset viewer.