Plugin Directory

Changeset 3196629


Ignore:
Timestamp:
11/25/2024 03:15:37 PM (16 months ago)
Author:
maheshmuralip
Message:

Update to version 1.3.17 from GitHub

Location:
nhsblocks
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • nhsblocks/tags/1.3.17/build/index.asset.php

    r3127995 r3196629  
    1 <?php return array('dependencies' => array('lodash', 'react'), 'version' => '0fba4a3fd14162328083');
     1<?php return array('dependencies' => array('lodash', 'react'), 'version' => '49619a2c5a6eff094434');
  • nhsblocks/tags/1.3.17/build/index.js

    r3127995 r3196629  
    1 (()=>{var e={957:()=>{const{registerBlockStyle:e,unregisterBlockStyle:t}=wp.blocks;wp.domReady((()=>{t("core/image",["default","rounded"]),e("core/image",[{name:"nhsuk-image",label:"NHS Image",isDefault:!0},{name:"default",label:"Default"}]),t("core/table",["regular"]),e("core/table",[{name:"nhsuk-table-responsive",label:"NHS Table",isDefault:!0},{name:"default",label:"Default"}])}))}},t={};function n(a){var l=t[a];if(void 0!==l)return l.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,n),s.exports}(()=>{"use strict";const e=window.React,t=(window.lodash,wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"59.000",height:"30"}))),a=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"})),l=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"})),s=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"})),r=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"})),c=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"})),o=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"})),i=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"})),u=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"})),m=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"})),h=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,d=[{name:"fullwidth",label:__("Full Width","nhsblocks"),icon:t,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-full"}]]},{name:"twocols",label:__("Two Columns","nhsblocks"),isDefault:!0,icon:a,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threecols",label:__("Three Columns","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"}]]},{name:"twothreecols",label:__("Two Columns Then Three Columns","nhsblocks"),icon:c,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:s,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:r,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}=wp.i18n,{registerBlockType:p,createBlock:b}=wp.blocks,{RichText:g,InspectorControls:E,URLInputButton:v,ColorPalette:_,MediaUpload:w,InnerBlocks:y,__experimentalBlockVariationPicker:N}=wp.blockEditor,{useDispatch:x,useSelect:T}=wp.data;p("nhsblocks/dashboardnav",{title:k("Dashboard Navigation","nhsblocks"),category:"nhsblocks",icon:"tagcloud",example:{},attributes:{template:{type:"array"}},edit:t=>{const{clientId:n,name:a}=t,{attributes:{template:l},setAttributes:s}=t,{replaceInnerBlocks:r}=x("core/block-editor"),{blockType:c,defaultVariation:o,hasInnerBlocks:i,variations:u}=T((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:s}=e("core/blocks");return{blockType:l(a),defaultVariation:s(a,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(n).length>0,variations:t(a,"block")}}),[n,a]),m=e=>e.map((([e,t,n=[]])=>b(e,t,m(n))));return i?(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard"},(0,e.createElement)(y,{template:d}))):(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard"},(0,e.createElement)(N,{variations:d,onSelect:e=>{e.attributes&&t.setAttributes(e.attributes),e.innerBlocks&&r(t.clientId,m(e.innerBlocks))}})))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-dashboard"},(0,e.createElement)(y.Content,null)))}}),p("nhsblocks/dashpanel",{title:k("Dashboard Region","nhsblocks"),description:k("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:t=>{const{setAttributes:n,attributes:a,className:l}=t,{overlayColor:s,backgroundImage:r,panelTitle:c,panelLink:o}=a;return[(0,e.createElement)(E,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Add a link for this panel"),(0,e.createElement)(v,{className:"nhsblocks-dropdown__input",label:k("Dashboard Link","nhsblocks"),onChange:e=>{n({panelLink:e})},url:o})),(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Select a background image:"),(0,e.createElement)(w,{onSelect:function(e){n({backgroundImage:e.sizes.full.url})},type:"image",value:r,render:({open:t})=>(0,e.createElement)("button",{className:"button button-primary button-hero",onClick:t},"Upload Image!")})),(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"OR")," Select a background color: ",(0,e.createElement)("br",null),(0,e.createElement)("i",null,"(this will be ignored if you choose an image above)"),(0,e.createElement)(_,{value:s,onChange:function(e){n({overlayColor:e})}}))),(0,e.createElement)("div",{className:`${l} nhsuk-panel-group__item`},(0,e.createElement)("div",{className:"nhsuk-panel-with-label",style:{backgroundColor:`${s}`,backgroundImage:`url(${r})`,backgroundSize:"cover",backgroundPosition:"center"}},(0,e.createElement)("h3",{className:"nhsuk-panel-with-label__label"},(0,e.createElement)(g,{placeholder:k("Panel Title","nhsblocks"),value:c,onChange:e=>{n({panelTitle:e})}})),(0,e.createElement)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})))]},save:t=>{const{attributes:{overlayColor:n,backgroundImage:a,panelTitle:l,panelLink:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-panel-group__item"},(0,e.createElement)("a",{href:s,className:"nhsuk-promo__link-wrapper"},(0,e.createElement)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${n}`}},(0,e.createElement)("h3",{className:"nhsuk-panel-with-label__label"},(0,e.createElement)(g.Content,{value:l})),(0,e.createElement)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:l}))))},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:t})=>(0,e.createElement)("div",{className:"nhsuk-panel-group__item"},(0,e.createElement)("a",{href:t.panelLink,className:"nhsuk-promo__link-wrapper"},(0,e.createElement)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${t.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${t.overlayColor}`}},(0,e.createElement)("h3",{className:"nhsuk-panel-with-label__label"},"`$",t.panelTitle,"`"),(0,e.createElement)("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:t=>{const{attributes:{panelTitle:n},className:a,setAttributes:l}=t;return(0,e.createElement)("div",{className:"nhsuk-do-dont-list"},(0,e.createElement)("h3",{className:"nhsuk-do-dont-list__label"},(0,e.createElement)(B,{placeholder:f("Panel Title","nhsblocks"),value:n,onChange:e=>{l({panelTitle:e})}})),(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-list--cross"},(0,e.createElement)(I,{allowedBlocks:[]})))},save:t=>{const{attributes:{panelTitle:n,panelText:a}}=t;return(0,e.createElement)("div",{className:"nhsuk-do-dont-list"},(0,e.createElement)("h3",{className:"nhsuk-do-dont-list__label"},(0,e.createElement)(B.Content,{value:n})),(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-list--cross"},(0,e.createElement)(I.Content,null)))}}),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:t=>{const{attributes:{panelText:n},setAttributes:a}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},(0,e.createElement)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})),(0,e.createElement)("span",null,(0,e.createElement)(B,{placeholder:f("Text","nhsblocks"),value:n,onChange:e=>{a({panelText:e})}})))},save:t=>{const{attributes:{panelText:n}}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},(0,e.createElement)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})),(0,e.createElement)("span",null,(0,e.createElement)(B.Content,{value:n})))}}),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:t=>{const{attributes:{panelText:n},setAttributes:a}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},(0,e.createElement)("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,e.createElement)("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,e.createElement)("span",null,(0,e.createElement)(B,{placeholder:f("Text","nhsblocks"),value:n,onChange:e=>{a({panelText:e})}})))},save:t=>{const{attributes:{panelText:n}}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},(0,e.createElement)("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,e.createElement)("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,e.createElement)("span",null,(0,e.createElement)(B.Content,{value:n})))}});const{__:L}=wp.i18n,{registerBlockType:P}=wp.blocks,{RichText:S,InspectorControls:A,BlockControls:q,BlockVerticalAlignmentToolbar:R,URLInputButton:D}=wp.blockEditor;P("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:t=>{const{attributes:{buttonLabel:n,buttonLink:a,verticalAlignment:l},className:s,setAttributes:r}=t;return[(0,e.createElement)(A,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Add a link for this button by clicking the chain icon below."),(0,e.createElement)(D,{className:"nhsblocks-dropdown__input",label:L("Button URL","nhsblocks"),onChange:e=>{r({buttonLink:e})},url:a}))),(0,e.createElement)(q,null,(0,e.createElement)(R,{onChange:e=>{r({verticalAlignment:e})},value:l})),(0,e.createElement)("div",{className:`${s} nhsuk-button`},(0,e.createElement)(S,{value:n,onChange:e=>{r({buttonLabel:e})},placeholder:"Button label"}))]},save:t=>{const{attributes:{buttonLabel:n,buttonLink:a}}=t;return(0,e.createElement)("a",{href:a,className:"nhsuk-button"},(0,e.createElement)(S.Content,{value:n}))}});const{__:O}=wp.i18n,{registerBlockType:$}=wp.blocks,{RichText:H,InnerBlocks:U,InspectorControls:V,useBlockProps:Q}=wp.blockEditor,{ToggleControl:z,PanelBody:W,PanelRow:G,RadioControl:M,clientId:F}=wp.components,j=[["core/image",{align:"right",width:"150px"}]];$("nhsblocks/reveal1",{title:O("Simple Reveal","nhsblocks"),category:"nhsblocks",icon:"plus-alt",styles:[{name:"downarrow",label:O("Down Arrow"),isDefault:!0},{name:"expander",label:O("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:t=>{const n=Q(),{attributes:{revealTitle:a,revealText:l,withImage:s},className:r,setAttributes:c}=t;return[(0,e.createElement)(V,null,(0,e.createElement)(W,null,(0,e.createElement)(G,null,(0,e.createElement)(z,{label:"Include an image?",checked:s,onChange:e=>c({withImage:e})})))),(0,e.createElement)("details",{className:`${r} nhsuk-details newstyle`,open:!0},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},(0,e.createElement)(H,{placeholder:O("Reveal Title","nhsblocks"),value:a,onChange:e=>{c({revealTitle:e})}}))),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},!0===s&&(0,e.createElement)(U,{template:j}),(0,e.createElement)(H,{...n,placeholder:O("Reveal Contents","nhsblocks"),onChange:e=>{c({revealText:e})},value:l})))]},save:t=>{const n=Q.save(),{attributes:{revealTitle:a,revealText:l,withImage:s}}=t;return(0,e.createElement)("details",{className:"nhsuk-details"},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},(0,e.createElement)(H.Content,{value:a}))),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},!0===s&&(0,e.createElement)(U.Content,null),(0,e.createElement)(H.Content,{...n,value:l})))},deprecated:[{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:t})=>(0,e.createElement)("details",{className:"nhsuk-details"},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},"`$",t.revealTitle,"`")),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},"`$",t.revealText,"`"))},{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:t})=>(0,e.createElement)("details",{className:"nhsuk-details"},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},"`$",t.revealTitle,"`")),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},"`$",t.revealText,"`"))}]});const{__:Y}=wp.i18n,{registerBlockType:J}=wp.blocks,{RichText:K,InnerBlocks:X}=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:t=>{const{attributes:{panelTitle:n},className:a,setAttributes:l}=t;return(0,e.createElement)("div",{className:`${a} nhsuk-card`},(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",null,(0,e.createElement)(K,{placeholder:Y("Panel Title","nhsblocks"),value:n,onChange:e=>{l({panelTitle:e})}})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(X,{template:Z}))))},save:t=>{const{attributes:{panelTitle:n,className:a}}=t;return(0,e.createElement)("div",{className:`${a} nhsuk-card`},(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",null,(0,e.createElement)(K.Content,{value:n})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(X.Content,null))))},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},save:({attributes:t})=>(0,e.createElement)("div",{className:"nhsuk-panel"},(0,e.createElement)("h3",null,(0,e.createElement)(K.Content,{value:t.panelTitle})),(0,e.createElement)("div",{className:"paneltext"},(0,e.createElement)(X.Content,null)))}]});const{__:ee}=wp.i18n,{registerBlockType:te}=wp.blocks,{RichText:ne,InspectorControls:ae,BlockControls:le,BlockVerticalAlignmentToolbar:se}=wp.blockEditor;te("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:t=>{const{attributes:{tagLabel:n},className:a,setAttributes:l}=t;return[(0,e.createElement)("strong",{className:`${a} nhsuk-tag`},(0,e.createElement)(ne,{value:n,onChange:e=>{l({tagLabel:e})},placeholder:"Tag label"}))]},save:t=>{const{attributes:{tagLabel:n}}=t;return(0,e.createElement)("strong",{className:"nhsuk-tag"},(0,e.createElement)(ne.Content,{value:n}))}});const{__:re}=wp.i18n,{registerBlockType:ce}=wp.blocks,{URLInputButton:oe,RichText:ie,InnerBlocks:ue,MediaUpload:me,InspectorControls:he,useBlockProps:de}=wp.blockEditor;ce("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:t=>{const n=de(),{attributes:{promoTitle:a,promoText:l,promoLink:s},className:r,setAttributes:c}=t;return(0,e.createElement)("div",{className:`${r} nhsuk-card nhsuk-card--clickable`},(0,e.createElement)(ue,{allowedBlocks:["core/image"]}),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",{className:"nhsuk-card__heading nhsuk-heading-m"},(0,e.createElement)(oe,{className:"nhsblocks-dropdown__input",label:re("Panel Link","nhsblocks"),onChange:e=>{c({promoLink:e})},url:s}),(0,e.createElement)(ie,{placeholder:re("Promo Title","nhsblocks"),value:a,onChange:e=>{c({promoTitle:e})}})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(ie,{...n,placeholder:re("Promo Contents","nhsblocks"),onChange:e=>{c({promoText:e})},value:l}))))},save:t=>{const n=de.save(),{attributes:{promoTitle:a,promoText:l,promoLink:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-card nhsuk-card--clickable"},(0,e.createElement)(ue.Content,null),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",{className:"nhsuk-card__heading nhsuk-heading-m"},(0,e.createElement)("a",{href:s,className:"nhsuk-card__link"},(0,e.createElement)(ie.Content,{value:a}))),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(ie.Content,{...n,value:l}))))},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:t=>{const n=de.save(),{attributes:{promoTitle:a,promoText:l,promoLink:s}}=t;var r=a.replace("</a>","").replace("</a>","</a></a>");return(0,e.createElement)("div",{className:"nhsuk-card nhsuk-card--clickable"},(0,e.createElement)(ue.Content,null),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",{className:"nhsuk-card__heading nhsuk-heading-m"},(0,e.createElement)(ie.Content,{...n,value:r})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(ie.Content,{...n,value:l}))))}},{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:t})=>(0,e.createElement)("div",{className:"nhsuk-promo"},(0,e.createElement)("a",{href:t.promoLink,className:"nhsuk-promo__link-wrapper"},(0,e.createElement)("div",{className:"nhsuk-promo__content"},(0,e.createElement)(ue.Content,null),(0,e.createElement)("h3",{className:"nhsuk-promo__heading"},t.promoTitle),(0,e.createElement)("div",{className:"nhsuk-promo__description"},t.promoText))))}]});const{__:ke}=wp.i18n,pe=[["nhsblocks/promo1"]],be=[{name:"twocolspro",label:"nhsblocks",isDefault:!0,icon:a,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onehalfpro"]]},{name:"threecolspro",label:ke("Three Columns Promos","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"]]},{name:"one3two3pro",label:ke("One Third / Two Thirds Columns Promos","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/twothirdspro"]]},{name:"two3one3pro",label:ke("Two Thirds / One Third Columns Promos","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/twothirdspro"],["nhsblocks/onethirdpro"]]},{name:"one4one2one4pro",label:ke("One Quarter / One Half / One Quarter Columns Promos","nhsblocks"),icon:m,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"]]},{name:"one4one4one2pro",label:ke("One Quarter / One Quarter / One Half Columns Promos","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"]]},{name:"one2one4one4",label:ke("One Half / One Quarter / One Quarter Columns Promos","nhsblocks"),icon:u,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"]]}],{__:ge}=wp.i18n,{registerBlockType:Ee,createBlock:ve}=wp.blocks,{InnerBlocks:_e,__experimentalBlockVariationPicker:we}=wp.blockEditor,{useDispatch:ye,useSelect:Ne}=wp.data;Ee("nhsblocks/promogroup",{title:ge("Grouped Promos","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:t=>{const{clientId:n,name:a}=t,{attributes:{template:l},setAttributes:s}=t,{replaceInnerBlocks:r}=ye("core/block-editor"),{blockType:c,defaultVariation:o,hasInnerBlocks:i,variations:u}=Ne((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:s}=e("core/blocks");return{blockType:l(a),defaultVariation:s(a,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(n).length>0,variations:t(a,"block")}}),[n,a]),m=e=>e.map((([e,t,n=[]])=>ve(e,t,m(n))));return i?(0,e.createElement)("div",{className:"nhsuk-grid-row nhsuk-card-group"},(0,e.createElement)(_e,{template:be})):(0,e.createElement)("div",{className:"nhsuk-grid-row nhsuk-card-group"},(0,e.createElement)(we,{variations:be,onSelect:e=>{e.attributes&&t.setAttributes(e.attributes),e.innerBlocks&&r(t.clientId,m(e.innerBlocks))}}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-row nhsuk-card-group"},(0,e.createElement)(_e.Content,null))}}),Ee("nhsblocks/onehalfpro",{title:ge("One Half Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half  nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/onethirdpro",{title:ge("One Third Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/onequarterpro",{title:ge("One Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/twothirdspro",{title:ge("Two Thirds Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/threequarterspro",{title:ge("Three Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))});const{__:xe}=wp.i18n,{registerBlockType:Te}=wp.blocks,{RichText:fe,useBlockProps:Ce}=wp.blockEditor;Te("nhsblocks/quote1",{title:xe("Simple Quote","nhsblocks"),category:"nhsblocks",icon:"format-quote",styles:[{name:"standard",label:xe("Standard"),isDefault:!0},{name:"quote-reverse",label:xe("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:t=>{const n=Ce(),{attributes:{quoteName:a,quoteText:l},className:s,setAttributes:r}=t;return(0,e.createElement)("div",{className:`${s} nhsuk-inset-text`},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Quote / Testimonial:"," "),(0,e.createElement)("div",{className:"nhsuk-inset-text__quote"},(0,e.createElement)(fe,{...n,placeholder:xe("Quote","nhsblocks"),onChange:e=>{r({quoteText:e})},value:l})),(0,e.createElement)("span",{className:"nhsuk-inset-text__quote-attribution"},(0,e.createElement)(fe,{placeholder:xe("Quote Name","nhsblocks"),value:a,onChange:e=>{r({quoteName:e})}})))},save:t=>{const n=Ce.save(),{attributes:{quoteName:a,quoteText:l}}=t;return(0,e.createElement)("div",{className:"nhsuk-inset-text"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Quote / Testimonial:"," "),(0,e.createElement)("div",{className:"nhsuk-inset-text__quote"},(0,e.createElement)(fe.Content,{...n,value:l})),(0,e.createElement)("span",{className:"nhsuk-inset-text__quote-attribution"},(0,e.createElement)(fe.Content,{value:a})))}});const{__:Be}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{RichText:Le,InnerBlocks:Pe,InspectorControls:Se,useBlockProps:Ae}=wp.blockEditor,{ToggleControl:qe,PanelBody:Re,PanelRow:De,RadioControl:Oe}=wp.components,{withState:$e}=wp.compose,He=[["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:t=>{const n=Ae(),{attributes:{cardTitle:a,cardText:l,withImage:s},clientId:r,className:c,setAttributes:o}=t;return[(0,e.createElement)(Se,null,(0,e.createElement)(Re,null,(0,e.createElement)(De,null,(0,e.createElement)(qe,{label:"Include an image?",checked:s,onChange:e=>o({withImage:e})})))),(0,e.createElement)("div",{className:`${c} nhsuk-care-card`},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"text"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le,{placeholder:Be("Card Title","nhsblocks"),value:a,onChange:e=>{o({cardTitle:e})}})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},!0===s&&(0,e.createElement)(Pe,{template:He}),(0,e.createElement)(Le,{...n,placeholder:Be("Card Contents","nhsblocks"),onChange:e=>{o({cardText:e})},value:l})))]},save:t=>{const n=Ae.save(),{attributes:{cardTitle:a,cardText:l,withImage:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",null,(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:a})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},!0===s&&(0,e.createElement)(Pe.Content,null),(0,e.createElement)(Le.Content,{...n,value:l})))},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:t})=>(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"heading","aria-level":"3"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},(0,e.createElement)(Le.Content,{multiline:"p",value:t.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:t})=>(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"text"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},(0,e.createElement)(Le.Content,{multiline:"p",value:t.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:t})=>(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"heading"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},(0,e.createElement)(Le.Content,{multiline:"p",value:t.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:t})=>(0,e.createElement)("div",{className:"nhsuk-card nhsuk-card--care"},(0,e.createElement)("div",{className:"nhsuk-card--care__heading-container"},(0,e.createElement)("h2",{className:"nhsuk-card--care__heading"},(0,e.createElement)("span",{role:"text",className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle}))),(0,e.createElement)("span",{className:"nhsuk-card--care__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)(Le.Content,{...Ae.save(),multiline:"p",value:t.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{__:Ue}=wp.i18n,Ve=[{name:"twocols",label:"nhsblocks",isDefault:!0,icon:a,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onehalf"]]},{name:"threecols",label:Ue("Three Columns Generic","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/onethird"],["nhsblocks/onethird"]]},{name:"one3two3",label:Ue("One Third / Two Thirds Columns Generic","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/twothirds"]]},{name:"two3one3",label:Ue("Two Thirds / One Third Columns Generic","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/twothirds"],["nhsblocks/onethird"]]},{name:"one4one2one4",label:Ue("One Quarter / One Half / One Quarter Columns Generic","nhsblocks"),icon:m,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onehalf"],["nhsblocks/onequarter"]]},{name:"one4one4one2",label:Ue("One Quarter / One Quarter / One Half Columns Generic","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onequarter"],["nhsblocks/onehalf"]]},{name:"one2one4one4",label:Ue("One Half / One Quarter / One Quarter Columns Generic","nhsblocks"),icon:u,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onequarter"],["nhsblocks/onequarter"]]}],{__:Qe}=wp.i18n,{registerBlockType:ze,createBlock:We}=wp.blocks,{InnerBlocks:Ge,__experimentalBlockVariationPicker:Me}=wp.blockEditor,{useDispatch:Fe,useSelect:je}=wp.data;ze("nhsblocks/rowgroup",{title:Qe("Grouped Items","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:t=>{const{clientId:n,name:a}=t,{attributes:{template:l},setAttributes:s}=t,{replaceInnerBlocks:r}=Fe("core/block-editor"),{blockType:c,defaultVariation:o,hasInnerBlocks:i,variations:u}=je((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:s}=e("core/blocks");return{blockType:l(a),defaultVariation:s(a,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(n).length>0,variations:t(a,"block")}}),[n,a]),m=e=>e.map((([e,t,n=[]])=>We(e,t,m(n))));return i?(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full"},(0,e.createElement)(Ge,{template:Ve}))):(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full"},(0,e.createElement)(Me,{variations:Ve,onSelect:e=>{e.attributes&&t.setAttributes(e.attributes),e.innerBlocks&&r(t.clientId,m(e.innerBlocks))}})))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full"},(0,e.createElement)(Ge.Content,null)))}}),ze("nhsblocks/onehalf",{title:Qe("One Half Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/onethird",{title:Qe("One Third Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/onequarter",{title:Qe("One Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/twothirds",{title:Qe("Two Thirds Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/threequarters",{title:Qe("Three Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters"},(0,e.createElement)(Ge.Content,null))}});const{__:Ye}=wp.i18n,{registerBlockType:Je}=wp.blocks,{RichText:Ke,InspectorControls:Xe,ColorPalette:Ze,MediaUpload:et,InnerBlocks:tt}=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:t=>{const{setAttributes:n,attributes:a,className:l}=t,{overlayColor:s,backgroundImage:r}=a;return[(0,e.createElement)(Xe,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Select a background image:"),(0,e.createElement)(et,{onSelect:function(e){n({backgroundImage:e.sizes.full.url})},type:"image",value:r,render:({open:t})=>(0,e.createElement)("button",{className:"button button-primary button-hero",onClick:t},"Upload Image!")})),(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"OR")," Select a background color: ",(0,e.createElement)("br",null),(0,e.createElement)("i",null,"(this will be ignored if you chose an image above)"),(0,e.createElement)(Ze,{value:s,onChange:function(e){n({overlayColor:e})}}))),(0,e.createElement)("section",{className:`${l}  nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description`,style:{backgroundColor:`${s}`,backgroundImage:`url(${r})`,backgroundSize:"cover",backgroundPosition:"center"}},(0,e.createElement)("div",{className:"nhsuk-hero__overlay"},(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(tt,{template:[["nhsblocks/heroinner",{}]]}))))))]},save:t=>{const{attributes:n,className:a}=t,{overlayColor:l,backgroundImage:s}=n;return(0,e.createElement)("section",{className:"nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description",style:{backgroundImage:`url(${s})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${l}`}},(0,e.createElement)("div",{className:"nhsuk-hero__overlay"},(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(tt.Content,null))))))}}),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:t=>{const{setAttributes:n,attributes:a,className:l}=t,{fontColor:s}=a;return[(0,e.createElement)(Xe,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Select a font color:"),(0,e.createElement)(Ze,{value:s,onChange:function(e){n({fontColor:e})}}))),(0,e.createElement)("div",{className:"nhsuk-hero-content"},(0,e.createElement)(Ke,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",value:a.texttitle,onChange:function(e){n({texttitle:e})},placeholder:"Enter your text here!",style:{color:s}}),(0,e.createElement)(Ke,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",value:a.texttext,onChange:function(e){n({texttext:e})},placeholder:"Enter your text here!",style:{color:s}}),(0,e.createElement)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"}))]},save:t=>{const{attributes:n,className:a}=t,{fontColor:l}=n;return(0,e.createElement)("div",{className:"nhsuk-hero-content"},(0,e.createElement)(Ke.Content,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",style:{color:l},value:n.texttitle}),(0,e.createElement)(Ke.Content,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",style:{color:l},value:n.texttext}),(0,e.createElement)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"}))}});const{__:nt}=wp.i18n,{registerBlockType:at}=wp.blocks,{InnerBlocks:lt}=wp.blockEditor;at("nhsblocks/stripesblock",{title:nt("Stripes Block","nhsblocks"),description:nt("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:t}=wp.blocks;wp.domReady((()=>{t("core/image",["default","rounded"]),e("core/image",[{name:"nhsuk-image",label:"NHS Image",isDefault:!0},{name:"default",label:"Default"}]),t("core/table",["regular"]),e("core/table",[{name:"nhsuk-table-responsive",label:"NHS Table",isDefault:!0},{name:"default",label:"Default"}])}))}},t={};function n(a){var l=t[a];if(void 0!==l)return l.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,n),s.exports}(()=>{"use strict";const e=window.React,t=(window.lodash,wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"59.000",height:"30"}))),a=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"})),l=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"})),s=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"})),r=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"})),c=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"})),o=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"})),i=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"})),u=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"})),m=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"})),h=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,d=[{name:"fullwidth",label:__("Full Width","nhsblocks"),icon:t,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-full"}]]},{name:"twocols",label:__("Two Columns","nhsblocks"),isDefault:!0,icon:a,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threecols",label:__("Three Columns","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"}]]},{name:"twothreecols",label:__("Two Columns Then Three Columns","nhsblocks"),icon:c,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:s,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:r,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}=wp.i18n,{registerBlockType:p,createBlock:b}=wp.blocks,{RichText:g,InspectorControls:E,URLInputButton:v,ColorPalette:_,MediaUpload:w,InnerBlocks:y,__experimentalBlockVariationPicker:N}=wp.blockEditor,{useDispatch:x,useSelect:T}=wp.data;p("nhsblocks/dashboardnav",{title:k("Dashboard Navigation","nhsblocks"),category:"nhsblocks",icon:"tagcloud",example:{},attributes:{template:{type:"array"}},edit:t=>{const{clientId:n,name:a}=t,{attributes:{template:l},setAttributes:s}=t,{replaceInnerBlocks:r}=x("core/block-editor"),{blockType:c,defaultVariation:o,hasInnerBlocks:i,variations:u}=T((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:s}=e("core/blocks");return{blockType:l(a),defaultVariation:s(a,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(n).length>0,variations:t(a,"block")}}),[n,a]),m=e=>e.map((([e,t,n=[]])=>b(e,t,m(n))));return i?(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard"},(0,e.createElement)(y,{template:d}))):(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard"},(0,e.createElement)(N,{variations:d,onSelect:e=>{e.attributes&&t.setAttributes(e.attributes),e.innerBlocks&&r(t.clientId,m(e.innerBlocks))}})))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-dashboard"},(0,e.createElement)(y.Content,null)))}}),p("nhsblocks/dashpanel",{title:k("Dashboard Region","nhsblocks"),description:k("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:t=>{const{setAttributes:n,attributes:a,className:l}=t,{overlayColor:s,backgroundImage:r,panelTitle:c,panelLink:o}=a;return[(0,e.createElement)(E,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Add a link for this panel"),(0,e.createElement)(v,{className:"nhsblocks-dropdown__input",label:k("Dashboard Link","nhsblocks"),onChange:e=>{n({panelLink:e})},url:o})),(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Select a background image:"),(0,e.createElement)(w,{onSelect:function(e){n({backgroundImage:e.sizes.full.url})},type:"image",value:r,render:({open:t})=>(0,e.createElement)("button",{className:"button button-primary button-hero",onClick:t},"Upload Image!")})),(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"OR")," Select a background color: ",(0,e.createElement)("br",null),(0,e.createElement)("i",null,"(this will be ignored if you choose an image above)"),(0,e.createElement)(_,{value:s,onChange:function(e){n({overlayColor:e})}}))),(0,e.createElement)("div",{className:`${l} nhsuk-panel-group__item`},(0,e.createElement)("div",{className:"nhsuk-panel-with-label",style:{backgroundColor:`${s}`,backgroundImage:`url(${r})`,backgroundSize:"cover",backgroundPosition:"center"}},(0,e.createElement)("h3",{className:"nhsuk-panel-with-label__label"},(0,e.createElement)(g,{placeholder:k("Panel Title","nhsblocks"),value:c,onChange:e=>{n({panelTitle:e})}})),(0,e.createElement)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})))]},save:t=>{const{attributes:{overlayColor:n,backgroundImage:a,panelTitle:l,panelLink:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-panel-group__item"},(0,e.createElement)("a",{href:s,className:"nhsuk-promo__link-wrapper"},(0,e.createElement)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${n}`}},(0,e.createElement)("h3",{className:"nhsuk-panel-with-label__label"},(0,e.createElement)(g.Content,{value:l})),(0,e.createElement)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:l}))))},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:t})=>(0,e.createElement)("div",{className:"nhsuk-panel-group__item"},(0,e.createElement)("a",{href:t.panelLink,className:"nhsuk-promo__link-wrapper"},(0,e.createElement)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${t.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${t.overlayColor}`}},(0,e.createElement)("h3",{className:"nhsuk-panel-with-label__label"},"`$",t.panelTitle,"`"),(0,e.createElement)("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:t=>{const{attributes:{panelTitle:n},className:a,setAttributes:l}=t;return(0,e.createElement)("div",{className:"nhsuk-do-dont-list"},(0,e.createElement)("h3",{className:"nhsuk-do-dont-list__label"},(0,e.createElement)(B,{placeholder:f("Panel Title","nhsblocks"),value:n,onChange:e=>{l({panelTitle:e})}})),(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-list--cross"},(0,e.createElement)(I,{allowedBlocks:[]})))},save:t=>{const{attributes:{panelTitle:n,panelText:a}}=t;return(0,e.createElement)("div",{className:"nhsuk-do-dont-list"},(0,e.createElement)("h3",{className:"nhsuk-do-dont-list__label"},(0,e.createElement)(B.Content,{value:n})),(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-list--cross"},(0,e.createElement)(I.Content,null)))}}),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:t=>{const{attributes:{panelText:n},setAttributes:a}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},(0,e.createElement)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})),(0,e.createElement)("span",null,(0,e.createElement)(B,{placeholder:f("Text","nhsblocks"),value:n,onChange:e=>{a({panelText:e})}})))},save:t=>{const{attributes:{panelText:n}}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},(0,e.createElement)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})),(0,e.createElement)("span",null,(0,e.createElement)(B.Content,{value:n})))}}),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:t=>{const{attributes:{panelText:n},setAttributes:a}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},(0,e.createElement)("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,e.createElement)("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,e.createElement)("span",null,(0,e.createElement)(B,{placeholder:f("Text","nhsblocks"),value:n,onChange:e=>{a({panelText:e})}})))},save:t=>{const{attributes:{panelText:n}}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},(0,e.createElement)("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,e.createElement)("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,e.createElement)("span",null,(0,e.createElement)(B.Content,{value:n})))}});const{__:L}=wp.i18n,{registerBlockType:P}=wp.blocks,{RichText:S,InspectorControls:A,BlockControls:q,BlockVerticalAlignmentToolbar:R,URLInputButton:D}=wp.blockEditor;P("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:t=>{const{attributes:{buttonLabel:n,buttonLink:a,verticalAlignment:l},className:s,setAttributes:r}=t;return[(0,e.createElement)(A,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Add a link for this button by clicking the chain icon below."),(0,e.createElement)(D,{className:"nhsblocks-dropdown__input",label:L("Button URL","nhsblocks"),onChange:e=>{r({buttonLink:e})},url:a}))),(0,e.createElement)(q,null,(0,e.createElement)(R,{onChange:e=>{r({verticalAlignment:e})},value:l})),(0,e.createElement)("div",{className:`${s} nhsuk-button`},(0,e.createElement)(S,{value:n,onChange:e=>{r({buttonLabel:e})},placeholder:"Button label"}))]},save:t=>{const{attributes:{buttonLabel:n,buttonLink:a}}=t;return(0,e.createElement)("a",{href:a,className:"nhsuk-button"},(0,e.createElement)(S.Content,{value:n}))}});const{__:O}=wp.i18n,{registerBlockType:$}=wp.blocks,{RichText:H,InnerBlocks:U,InspectorControls:V,useBlockProps:Q}=wp.blockEditor,{ToggleControl:z,PanelBody:W,PanelRow:G,RadioControl:M,clientId:F}=wp.components,j=[["core/image",{align:"right",width:"150px"}]];$("nhsblocks/reveal1",{title:O("Simple Reveal","nhsblocks"),category:"nhsblocks",icon:"plus-alt",styles:[{name:"downarrow",label:O("Down Arrow"),isDefault:!0},{name:"expander",label:O("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:t=>{const n=Q(),{attributes:{revealTitle:a,revealText:l,withImage:s},className:r,setAttributes:c}=t;return[(0,e.createElement)(V,null,(0,e.createElement)(W,null,(0,e.createElement)(G,null,(0,e.createElement)(z,{label:"Include an image?",checked:s,onChange:e=>c({withImage:e})})))),(0,e.createElement)("details",{className:`${r} nhsuk-details newstyle`,open:!0},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},(0,e.createElement)(H,{placeholder:O("Reveal Title","nhsblocks"),value:a,onChange:e=>{c({revealTitle:e})}}))),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},!0===s&&(0,e.createElement)(U,{template:j}),(0,e.createElement)(H,{...n,placeholder:O("Reveal Contents","nhsblocks"),onChange:e=>{c({revealText:e})},value:l})))]},save:t=>{const n=Q.save(),{attributes:{revealTitle:a,revealText:l,withImage:s}}=t;return(0,e.createElement)("details",{className:"nhsuk-details"},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},(0,e.createElement)(H.Content,{value:a}))),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},!0===s&&(0,e.createElement)(U.Content,null),(0,e.createElement)(H.Content,{...n,value:l})))},deprecated:[{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:t})=>(0,e.createElement)("details",{className:"nhsuk-details"},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},"`$",t.revealTitle,"`")),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},"`$",t.revealText,"`"))},{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:t})=>(0,e.createElement)("details",{className:"nhsuk-details"},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},"`$",t.revealTitle,"`")),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},"`$",t.revealText,"`"))}]});const{__:Y}=wp.i18n,{registerBlockType:J}=wp.blocks,{RichText:K,InnerBlocks:X}=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:t=>{const{attributes:{panelTitle:n},className:a,setAttributes:l}=t;return(0,e.createElement)("div",{className:`${a} nhsuk-card`},(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",null,(0,e.createElement)(K,{placeholder:Y("Panel Title","nhsblocks"),value:n,onChange:e=>{l({panelTitle:e})}})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(X,{template:Z}))))},save:t=>{const{attributes:{panelTitle:n,className:a}}=t;return(0,e.createElement)("div",{className:`${a} nhsuk-card`},(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",null,(0,e.createElement)(K.Content,{value:n})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(X.Content,null))))},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},save:({attributes:t})=>(0,e.createElement)("div",{className:"nhsuk-panel"},(0,e.createElement)("h3",null,(0,e.createElement)(K.Content,{value:t.panelTitle})),(0,e.createElement)("div",{className:"paneltext"},(0,e.createElement)(X.Content,null)))}]});const{__:ee}=wp.i18n,{registerBlockType:te}=wp.blocks,{RichText:ne,InspectorControls:ae,BlockControls:le,BlockVerticalAlignmentToolbar:se}=wp.blockEditor;te("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:t=>{const{attributes:{tagLabel:n},className:a,setAttributes:l}=t;return[(0,e.createElement)("strong",{className:`${a} nhsuk-tag`},(0,e.createElement)(ne,{value:n,onChange:e=>{l({tagLabel:e})},placeholder:"Tag label"}))]},save:t=>{const{attributes:{tagLabel:n}}=t;return(0,e.createElement)("strong",{className:"nhsuk-tag"},(0,e.createElement)(ne.Content,{value:n}))}});const{__:re}=wp.i18n,{registerBlockType:ce}=wp.blocks,{URLInputButton:oe,RichText:ie,InnerBlocks:ue,MediaUpload:me,InspectorControls:he,useBlockProps:de}=wp.blockEditor;ce("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:t=>{const n=de(),{attributes:{promoTitle:a,promoText:l,promoLink:s},className:r,setAttributes:c}=t;return(0,e.createElement)("div",{className:`${r} nhsuk-card nhsuk-card--clickable`},(0,e.createElement)(ue,{allowedBlocks:["core/image"]}),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",{className:"nhsuk-card__heading nhsuk-heading-m"},(0,e.createElement)(oe,{className:"nhsblocks-dropdown__input",label:re("Panel Link","nhsblocks"),onChange:e=>{c({promoLink:e})},url:s}),(0,e.createElement)(ie,{placeholder:re("Promo Title","nhsblocks"),value:a,onChange:e=>{c({promoTitle:e})}})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(ie,{...n,placeholder:re("Promo Contents","nhsblocks"),onChange:e=>{c({promoText:e})},value:l}))))},save:t=>{const n=de.save(),{attributes:{promoTitle:a,promoText:l,promoLink:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-card nhsuk-card--clickable"},(0,e.createElement)(ue.Content,null),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",{className:"nhsuk-card__heading nhsuk-heading-m"},(0,e.createElement)("a",{href:s,className:"nhsuk-card__link"},(0,e.createElement)(ie.Content,{value:a}))),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(ie.Content,{...n,value:l}))))},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:t=>{const n=de.save(),{attributes:{promoTitle:a,promoText:l,promoLink:s}}=t;var r=a.replace("</a>","").replace("</a>","</a></a>");return(0,e.createElement)("div",{className:"nhsuk-card nhsuk-card--clickable"},(0,e.createElement)(ue.Content,null),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",{className:"nhsuk-card__heading nhsuk-heading-m"},(0,e.createElement)(ie.Content,{...n,value:r})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(ie.Content,{...n,value:l}))))}},{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:t})=>(0,e.createElement)("div",{className:"nhsuk-promo"},(0,e.createElement)("a",{href:t.promoLink,className:"nhsuk-promo__link-wrapper"},(0,e.createElement)("div",{className:"nhsuk-promo__content"},(0,e.createElement)(ue.Content,null),(0,e.createElement)("h3",{className:"nhsuk-promo__heading"},t.promoTitle),(0,e.createElement)("div",{className:"nhsuk-promo__description"},t.promoText))))}]});const{__:ke}=wp.i18n,pe=[["nhsblocks/promo1"]],be=[{name:"twocolspro",label:"nhsblocks",isDefault:!0,icon:a,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onehalfpro"]]},{name:"threecolspro",label:ke("Three Columns Promos","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"]]},{name:"one3two3pro",label:ke("One Third / Two Thirds Columns Promos","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/twothirdspro"]]},{name:"two3one3pro",label:ke("Two Thirds / One Third Columns Promos","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/twothirdspro"],["nhsblocks/onethirdpro"]]},{name:"one4one2one4pro",label:ke("One Quarter / One Half / One Quarter Columns Promos","nhsblocks"),icon:m,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"]]},{name:"one4one4one2pro",label:ke("One Quarter / One Quarter / One Half Columns Promos","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"]]},{name:"one2one4one4",label:ke("One Half / One Quarter / One Quarter Columns Promos","nhsblocks"),icon:u,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"]]}],{__:ge}=wp.i18n,{registerBlockType:Ee,createBlock:ve}=wp.blocks,{InnerBlocks:_e,__experimentalBlockVariationPicker:we}=wp.blockEditor,{useDispatch:ye,useSelect:Ne}=wp.data;Ee("nhsblocks/promogroup",{title:ge("Grouped Promos","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:t=>{const{clientId:n,name:a}=t,{attributes:{template:l},setAttributes:s}=t,{replaceInnerBlocks:r}=ye("core/block-editor"),{blockType:c,defaultVariation:o,hasInnerBlocks:i,variations:u}=Ne((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:s}=e("core/blocks");return{blockType:l(a),defaultVariation:s(a,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(n).length>0,variations:t(a,"block")}}),[n,a]),m=e=>e.map((([e,t,n=[]])=>ve(e,t,m(n))));return i?(0,e.createElement)("div",{className:"nhsuk-grid-row nhsuk-card-group"},(0,e.createElement)(_e,{template:be})):(0,e.createElement)("div",{className:"nhsuk-grid-row nhsuk-card-group"},(0,e.createElement)(we,{variations:be,onSelect:e=>{e.attributes&&t.setAttributes(e.attributes),e.innerBlocks&&r(t.clientId,m(e.innerBlocks))}}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-row nhsuk-card-group"},(0,e.createElement)(_e.Content,null))}}),Ee("nhsblocks/onehalfpro",{title:ge("One Half Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half  nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/onethirdpro",{title:ge("One Third Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/onequarterpro",{title:ge("One Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/twothirdspro",{title:ge("Two Thirds Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/threequarterspro",{title:ge("Three Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))});const{__:xe}=wp.i18n,{registerBlockType:Te}=wp.blocks,{RichText:fe,useBlockProps:Ce}=wp.blockEditor;Te("nhsblocks/quote1",{title:xe("Simple Quote","nhsblocks"),category:"nhsblocks",icon:"format-quote",styles:[{name:"standard",label:xe("Standard"),isDefault:!0},{name:"quote-reverse",label:xe("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:t=>{const n=Ce(),{attributes:{quoteName:a,quoteText:l},className:s,setAttributes:r}=t;return(0,e.createElement)("div",{className:`${s} nhsuk-inset-text`},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Quote / Testimonial:"," "),(0,e.createElement)("div",{className:"nhsuk-inset-text__quote"},(0,e.createElement)(fe,{...n,placeholder:xe("Quote","nhsblocks"),onChange:e=>{r({quoteText:e})},value:l})),(0,e.createElement)("span",{className:"nhsuk-inset-text__quote-attribution"},(0,e.createElement)(fe,{placeholder:xe("Quote Name","nhsblocks"),value:a,onChange:e=>{r({quoteName:e})}})))},save:t=>{const n=Ce.save(),{attributes:{quoteName:a,quoteText:l}}=t;return(0,e.createElement)("div",{className:"nhsuk-inset-text"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Quote / Testimonial:"," "),(0,e.createElement)("div",{className:"nhsuk-inset-text__quote"},(0,e.createElement)(fe.Content,{...n,value:l})),(0,e.createElement)("span",{className:"nhsuk-inset-text__quote-attribution"},(0,e.createElement)(fe.Content,{value:a})))}});const{__:Be}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{RichText:Le,InnerBlocks:Pe,InspectorControls:Se,useBlockProps:Ae}=wp.blockEditor,{ToggleControl:qe,PanelBody:Re,PanelRow:De,RadioControl:Oe}=wp.components,{withState:$e}=wp.compose,He=[["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:t=>{const n=Ae(),{attributes:{cardTitle:a,cardText:l,withImage:s},clientId:r,className:c,setAttributes:o}=t;return[(0,e.createElement)(Se,null,(0,e.createElement)(Re,null,(0,e.createElement)(De,null,(0,e.createElement)(qe,{label:"Include an image?",checked:s,onChange:e=>o({withImage:e})})))),(0,e.createElement)("div",{className:`${c} nhsuk-care-card`},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"text"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le,{placeholder:Be("Card Title","nhsblocks"),value:a,onChange:e=>{o({cardTitle:e})}})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},!0===s&&(0,e.createElement)(Pe,{template:He}),(0,e.createElement)(Le,{...n,placeholder:Be("Card Contents","nhsblocks"),onChange:e=>{o({cardText:e})},value:l})))]},save:t=>{const n=Ae.save(),{attributes:{cardTitle:a,cardText:l,withImage:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",null,(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:a})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},!0===s&&(0,e.createElement)(Pe.Content,null),(0,e.createElement)(Le.Content,{...n,value:l})))},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:t})=>(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"heading","aria-level":"3"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},(0,e.createElement)(Le.Content,{multiline:"p",value:t.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:t})=>(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"text"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},(0,e.createElement)(Le.Content,{multiline:"p",value:t.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:t})=>(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"heading"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},(0,e.createElement)(Le.Content,{multiline:"p",value:t.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:t})=>(0,e.createElement)("div",{className:"nhsuk-card nhsuk-card--care"},(0,e.createElement)("div",{className:"nhsuk-card--care__heading-container"},(0,e.createElement)("h2",{className:"nhsuk-card--care__heading"},(0,e.createElement)("span",{role:"text",className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle}))),(0,e.createElement)("span",{className:"nhsuk-card--care__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)(Le.Content,{...Ae.save(),multiline:"p",value:t.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{__:Ue}=wp.i18n,Ve=[{name:"twocols",label:"nhsblocks",isDefault:!0,icon:a,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onehalf"]]},{name:"threecols",label:Ue("Three Columns Generic","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/onethird"],["nhsblocks/onethird"]]},{name:"one3two3",label:Ue("One Third / Two Thirds Columns Generic","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/twothirds"]]},{name:"two3one3",label:Ue("Two Thirds / One Third Columns Generic","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/twothirds"],["nhsblocks/onethird"]]},{name:"one4one2one4",label:Ue("One Quarter / One Half / One Quarter Columns Generic","nhsblocks"),icon:m,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onehalf"],["nhsblocks/onequarter"]]},{name:"one4one4one2",label:Ue("One Quarter / One Quarter / One Half Columns Generic","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onequarter"],["nhsblocks/onehalf"]]},{name:"one2one4one4",label:Ue("One Half / One Quarter / One Quarter Columns Generic","nhsblocks"),icon:u,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onequarter"],["nhsblocks/onequarter"]]}],{__:Qe}=wp.i18n,{registerBlockType:ze,createBlock:We}=wp.blocks,{InnerBlocks:Ge,__experimentalBlockVariationPicker:Me}=wp.blockEditor,{useDispatch:Fe,useSelect:je}=wp.data;ze("nhsblocks/rowgroup",{title:Qe("Grouped Items","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:t=>{const{clientId:n,name:a}=t,{attributes:{template:l},setAttributes:s}=t,{replaceInnerBlocks:r}=Fe("core/block-editor"),{blockType:c,defaultVariation:o,hasInnerBlocks:i,variations:u}=je((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:s}=e("core/blocks");return{blockType:l(a),defaultVariation:s(a,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(n).length>0,variations:t(a,"block")}}),[n,a]),m=e=>e.map((([e,t,n=[]])=>We(e,t,m(n))));return i?(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full"},(0,e.createElement)(Ge,{template:Ve}))):(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full"},(0,e.createElement)(Me,{variations:Ve,onSelect:e=>{e.attributes&&t.setAttributes(e.attributes),e.innerBlocks&&r(t.clientId,m(e.innerBlocks))}})))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full"},(0,e.createElement)(Ge.Content,null)))}}),ze("nhsblocks/onehalf",{title:Qe("One Half Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/onethird",{title:Qe("One Third Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/onequarter",{title:Qe("One Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/twothirds",{title:Qe("Two Thirds Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/threequarters",{title:Qe("Three Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters"},(0,e.createElement)(Ge.Content,null))}});const{__:Ye}=wp.i18n,{registerBlockType:Je}=wp.blocks,{RichText:Ke,InspectorControls:Xe,ColorPalette:Ze,MediaUpload:et,InnerBlocks:tt}=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:t=>{const{setAttributes:n,attributes:a,className:l}=t,{overlayColor:s,backgroundImage:r}=a;return[(0,e.createElement)(Xe,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Select a background image:"),(0,e.createElement)(et,{onSelect:function(e){n({backgroundImage:e.sizes.full.url})},type:"image",value:r,render:({open:t})=>(0,e.createElement)("button",{className:"button button-primary button-hero",onClick:t},"Upload Image!")})),(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"OR")," Select a background color: ",(0,e.createElement)("br",null),(0,e.createElement)("i",null,"(this will be ignored if you chose an image above)"),(0,e.createElement)(Ze,{value:s,onChange:function(e){n({overlayColor:e})}}))),(0,e.createElement)("section",{className:`${l}  nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description`,style:{backgroundColor:`${s}`,backgroundImage:`url(${r})`,backgroundSize:"cover",backgroundPosition:"center"}},(0,e.createElement)("div",{className:"nhsuk-hero__overlay"},(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(tt,{template:[["nhsblocks/heroinner",{}]]}))))))]},save:t=>{const{attributes:n,className:a}=t,{overlayColor:l,backgroundImage:s}=n;return(0,e.createElement)("section",{className:"nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description",style:{backgroundImage:`url(${s})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${l}`}},(0,e.createElement)("div",{className:"nhsuk-hero__overlay"},(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(tt.Content,null))))))}}),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:t=>{const{setAttributes:n,attributes:a,className:l}=t,{fontColor:s}=a;return[(0,e.createElement)(Xe,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Select a font color:"),(0,e.createElement)(Ze,{value:s,onChange:function(e){n({fontColor:e})}}))),(0,e.createElement)("div",{className:"nhsuk-hero-content"},(0,e.createElement)(Ke,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",value:a.texttitle,onChange:function(e){n({texttitle:e})},placeholder:"Enter your text here!",style:{color:s}}),(0,e.createElement)(Ke,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",value:a.texttext,onChange:function(e){n({texttext:e})},placeholder:"Enter your text here!",style:{color:s}}),(0,e.createElement)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"}))]},save:t=>{const{attributes:n,className:a}=t,{fontColor:l}=n;return(0,e.createElement)("div",{className:"nhsuk-hero-content"},(0,e.createElement)(Ke.Content,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",style:{color:l},value:n.texttitle}),(0,e.createElement)(Ke.Content,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",style:{color:l},value:n.texttext}),(0,e.createElement)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"}))}});const{__:nt}=wp.i18n,{registerBlockType:at}=wp.blocks,{InnerBlocks:lt}=wp.blockEditor;at("nhsblocks/stripesblock",{title:nt("Stripes Block","nhsblocks"),description:nt("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:{
    22/* translators: example text. */
    33content:nt("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/paragraph",attributes:{
     
    77content:nt("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{
    88/* translators: example text. */
    9 content:nt("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},getEditWrapperProps:()=>({"data-align":"full"}),edit:t=>(0,e.createElement)("div",{className:"nhsuk-striped-blocks"},(0,e.createElement)(lt,{template:[["nhsblocks/stripeblock",{}]],allowedBlocks:["nhsblocks/stripeblock"]})),save:t=>(0,e.createElement)(lt.Content,null)}),at("nhsblocks/stripeblock",{title:nt("Stripe Block","nhsblocks"),description:nt("Inner block that allows alternate grey stripes","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"menu-alt",getEditWrapperProps:()=>({"data-align":"full"}),edit:t=>{const n=wp.blocks.getBlockTypes().map((e=>e.name)).filter((e=>"nhsblocks/stripeblock"!==e));return(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)(lt,{allowedBlocks:n}))},save:t=>(0,e.createElement)("section",{className:"nhsuk-section"},(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)(lt.Content,null)))});const{__:st}=wp.i18n,{registerBlockType:rt}=wp.blocks,{RichText:ct,URLInput:ot,InnerBlocks:it}=wp.blockEditor,{Fragment:ut}=wp.element,{TextControl:mt}=wp.components;rt("nhsblocks/contentslist",{title:st("Contents List","nhsblocks"),description:st("Use contents lists to allow users to navigate between related pages, for example about a single condition.","nhsblocks"),category:"nhsblocks",icon:"editor-ul",keywords:[st("Contents List","nhsblocks"),st("Navigation","nhsblocks"),st("Related pages","nhsblocks")],example:{innerBlocks:[{name:"nhsblocks/contentslistitem",attributes:{text:"About",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"Symptoms",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"When to see a doctor",url:"#"}}]},edit:t=>{const{className:n,setAttributes:a,attributes:{title:l}}=t;return(0,e.createElement)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide"},(0,e.createElement)("h2",{className:"nhsuk-u-visually-hidden"},st("Contents","nhsblocks")),(0,e.createElement)("ol",{className:"nhsuk-contents-list__list"},(0,e.createElement)(it,{template:[["nhsblocks/contentslistitem",{}]],allowedBlocks:["nhsblocks/contentslistitem"]})))},save:t=>(0,e.createElement)("nav",{className:"nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide"},(0,e.createElement)("h2",{className:"nhsuk-u-visually-hidden"},st("Contents","nhsblocks")),(0,e.createElement)("ol",{className:"nhsuk-contents-list__list"},(0,e.createElement)(it.Content,null)))}),rt("nhsblocks/contentslistitem",{title:st("Contents List Item","nhsblocks"),description:st("List Item to go into the contents list","nhsblocks"),category:"nhsblocks",icon:"editor-ul",parent:["nhsblocks/contentslist"],attributes:{text:{type:"array",source:"children",selector:".pagename"},url:{type:"string",source:"attribute",attribute:"href",selector:"a"}},edit:t=>{const{className:n,setAttributes:a,isSelected:l,attributes:{text:s,url:r}}=t;return(0,e.createElement)("li",{className:"nhsuk-contents-list__item"},l?(0,e.createElement)("div",null,(0,e.createElement)(mt,{id:"example-input-field",label:(st("Link Text"),"nhsblocks"),value:s,onChange:e=>a({text:e})}),(0,e.createElement)(ot,{className:"nhsuk-contents-list__link",value:r,onChange:e=>a({url:e}),placeholder:"Page Link (start typing to choose link)"})):(0,e.createElement)(ut,null,r?(0,e.createElement)("a",{className:"nhsuk-contents-list__link",href:"{ url }"},s):(0,e.createElement)("span",{className:"nhsuk-contents-list__current"},s)))},save:t=>{const{className:n,attributes:{text:a,url:l}}=t;return(0,e.createElement)(ut,null,l?(0,e.createElement)("li",{className:"nhsuk-contents-list__item"},(0,e.createElement)("a",{className:"pagename nhsuk-contents-list__link",href:l},a)):(0,e.createElement)("li",{className:"nhsuk-contents-list__item","aria-current":"page"},(0,e.createElement)("span",{className:"pagename nhsuk-contents-list__current"},a)))}});const{__:ht}=wp.i18n,{registerBlockType:dt}=wp.blocks,{RichText:kt,URLInput:pt,InnerBlocks:bt}=wp.blockEditor,{withSelect:gt,subscribe:Et,select:vt}=wp.data,{Fragment:_t}=wp.element,{Button:wt,TextControl:yt}=wp.components;dt("nhsblocks/contentslistpage",{title:ht("Contents List within a page","nhsblocks"),description:ht("Use contents lists to allow users to navigate sections within a page. This will automatically add all h2 tags on this page to a scrollable list ","nhsblocks"),category:"nhsblocks",icon:"editor-ul",example:{attributes:{h2titles:[{text:"Heading number one",url:"#1",id:"11111"},{text:"Heading number two",url:"#2",id:"22222"},{text:"Heading number three",url:"#3",id:"33333"}]}},attributes:{h2titles:{type:"array",default:[]}},keywords:[ht("Contents List Page","nhsblocks"),ht("Navigation","nhsblocks"),ht("Related sections on page","nhsblocks")],edit:gt((e=>({blocks:e("core/block-editor").getBlocks()})))((({blocks:t,className:n,setAttributes:a,attributes:{h2titles:l}})=>{const s=[];let r=0;const c=e=>{if("core/heading"===e.name&&2===e.attributes.level){const t="nhs-block-anchor-"+r++,n=e.attributes.content.replace(/<[^>]+>/g,"");s.push({text:n,url:t,id:e.clientId})}e.innerBlocks&&e.innerBlocks.map(c)};t.map(c);const o=l.length==s.length&&l.every((function(e,t){return s[t].text===e.text&&s[t].url===e.url}));return(0,e.createElement)("div",null,(0,e.createElement)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide"},(0,e.createElement)("h2",{className:"nhsuk-u-visually-hidden"},ht("Contents","nhsblocks")),(0,e.createElement)("ol",{className:"nhsuk-contents-list__list"},l?l.map((t=>(0,e.createElement)("li",{className:"nhsuk-contents-list__item",key:t.url},(0,e.createElement)("a",{className:"nhsuk-contents-list__link",href:"#"+t.url},t.text)))):(0,e.createElement)("p",null,"Press the button below to make a table of contents for this page"),(0,e.createElement)("p",null,(0,e.createElement)(wt,{onClick:()=>{a({h2titles:s});for(let e=s.length-1;e>=0;e--)vt("core/block-editor").getBlock(s[e].id).attributes.anchor=s[e].url},className:"is-primary",disabled:o},"Update Heading Block")))))})),save:e=>{const{attributes:{h2titles:t}}=e;return null}});const{__:Nt}=wp.i18n,{registerBlockType:xt}=wp.blocks,{format:Tt}=wp.date,{RichText:ft,InnerBlocks:Ct}=wp.blockEditor,{dispatch:Bt,subscribe:It,select:Lt,withSelect:Pt}=wp.data;xt("nhsblocks/reviewdate",{title:Nt("Review Date","nhsblocks"),category:"nhsblocks",icon:"update",example:{attributes:{lastSaved:Nt("5 July 1948")}},attributes:{lastSaved:{type:"string",source:"html",selector:".last-saved-date"}},edit:Pt((e=>({savedDate:e("core/editor").getEditedPostAttribute("modified")})))((({savedDate:t,className:n,setAttributes:a,attributes:{lastSaved:l}})=>{if(t){const n=new Date(t),s=Tt("d F Y",n);return l!==s&&(void 0===l?(a({lastSaved:s}),Bt("core/editor").savePost()):a({lastSaved:s})),(0,e.createElement)("div",{className:"nhsuk-review-date"},(0,e.createElement)("p",{className:"nhsuk-body-s"},"Page last reviewed:"," ",(0,e.createElement)("span",{className:"last-saved-date"},l)))}})),save:t=>{const{className:n,attributes:{lastSaved:a}}=t;return(0,e.createElement)("div",{className:"nhsuk-review-date"},(0,e.createElement)("p",{className:"nhsuk-body-s"},"Page last reviewed:"," ",(0,e.createElement)("span",{className:"last-saved-date"},a)))}}),n(957);const St={};St.left=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-left",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M4.1 12.3l2.7 3c.2.2.5.2.7 0 .1-.1.1-.2.1-.3v-2h11c.6 0 1-.4 1-1s-.4-1-1-1h-11V9c0-.2-.1-.4-.3-.5h-.2c-.1 0-.3.1-.4.2l-2.7 3c0 .2 0 .4.1.6z"})),St.right=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-right",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M19.6 11.66l-2.73-3A.51.51 0 0016 9v2H5a1 1 0 000 2h11v2a.5.5 0 00.32.46.39.39 0 00.18 0 .52.52 0 00.37-.16l2.73-3a.5.5 0 000-.64z"}));const At=St,{__:qt}=wp.i18n,{registerBlockType:Rt}=wp.blocks,{RichText:Dt,InnerBlocks:Ot}=wp.blockEditor,{Fragment:$t}=wp.element,{URLInput:Ht}=wp.blockEditor,{TextControl:Ut}=wp.components;Rt("nhsblocks/pagination",{title:qt("Pagination","nhsblocks"),category:"nhsblocks",icon:"arrow-right-alt",example:{attributes:{prevText:qt("Page Title"),nextText:qt("Page Title")}},attributes:{prevLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--prev"},nextLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--next"},prevText:{type:"string",source:"html",selector:".prev-text",default:"Page Title"},nextText:{type:"string",source:"html",selector:".next-text",default:"Page Title"}},edit:t=>{const{className:n,isSelected:a,setAttributes:l,attributes:{prevLink:s,nextLink:r,prevText:c,nextText:o}}=t;return(0,e.createElement)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination"},(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-pagination__list"},(0,e.createElement)("li",{className:"nhsuk-pagination-item--previous"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev"},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Previous","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page"},c),At.left),a?(0,e.createElement)($t,null,(0,e.createElement)(Ut,{label:(qt("Page Title"),"nhsblocks"),value:c,hideLabelFromVision:!0,onChange:e=>l({prevText:e})}),(0,e.createElement)(Ht,{className:"url",value:s,onChange:e=>l({prevLink:e})})):null),(0,e.createElement)("li",{className:"nhsuk-pagination-item--next"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next"},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Next","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page"},o),At.right),a?(0,e.createElement)($t,null,(0,e.createElement)(Ut,{label:(qt("Page Title"),"nhsblocks"),value:o,hideLabelFromVision:!0,onChange:e=>l({nextText:e})}),(0,e.createElement)(Ht,{className:"url",value:r,onChange:e=>l({nextLink:e})})):null)))},save:t=>{const{className:n,attributes:{prevLink:a,nextLink:l,prevText:s,nextText:r}}=t;return(0,e.createElement)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination"},(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-pagination__list"},(0,e.createElement)("li",{className:"nhsuk-pagination-item--previous"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev",href:a},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Previous","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page prev-text"},s),At.left)),(0,e.createElement)("li",{className:"nhsuk-pagination-item--next"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next",href:l},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Next","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page next-text"},r),At.right))))}});const Vt={};Vt.action=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__arrow-right-circle",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M12 2a10 10 0 00-9.95 9h11.64L9.74 7.05a1 1 0 011.41-1.41l5.66 5.65a1 1 0 010 1.42l-5.66 5.65a1 1 0 01-1.41 0 1 1 0 010-1.41L13.69 13H2.05A10 10 0 1012 2z"})),Vt.back=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__chevron-left",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M8.5 12c0-.3.1-.5.3-.7l5-5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L10.9 12l4.3 4.3c.4.4.4 1 0 1.4s-1 .4-1.4 0l-5-5c-.2-.2-.3-.4-.3-.7z"}));const Qt=Vt,{__:zt}=wp.i18n,{registerBlockType:Wt}=wp.blocks,{URLInput:Gt}=wp.blockEditor,{Fragment:Mt}=wp.element,{TextControl:Ft}=wp.components;Wt("nhsblocks/actionlink",{title:zt("Action Link","nhsblocks"),description:"Use action links to help users get to the next stage of a journey quickly by signposting the start of a digital service.",category:"nhsblocks",icon:Qt.action,keywords:[zt("signpost start","nhsblocks"),zt("transactional services multi-page forms","nhsblocks")],example:{attributes:{actionText:zt("Call to Action")}},attributes:{actionText:{type:"string",source:"html",selector:".nhsuk-action-link__text"},actionLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-action-link__link"},arrowsvgs:{type:"string",source:"html",selector:"svg",default:Qt.action}},edit:t=>{const{className:n,setAttributes:a,isSelected:l,attributes:{actionText:s,actionLink:r,arrowssvgs:c}}=t;return(0,e.createElement)("div",{className:"nhsuk-action-link"},(0,e.createElement)("a",{className:"nhsuk-action-link__link"},Qt.action,(0,e.createElement)("span",{className:"nhsuk-action-link__text"},s)),l?(0,e.createElement)("div",null,(0,e.createElement)(Ft,{label:zt(" ","nhsblocks"),placeholder:zt("Call to Action","nhsblocks"),value:s,onChange:e=>a({actionText:e})}),(0,e.createElement)(Gt,{value:r,placeholder:zt("Add a link (type to search or paste a whole url)","nhsblocks"),onChange:e=>a({actionLink:e})})):null)},save:t=>{const{className:n,attributes:{actionText:a,actionLink:l,arrowssvgs:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-action-link"},(0,e.createElement)("a",{className:"nhsuk-action-link__link",href:l},Qt.action,(0,e.createElement)("span",{className:"nhsuk-action-link__text"},a)))}});const{__:jt}=wp.i18n,{registerBlockType:Yt}=wp.blocks,{URLInput:Jt}=wp.blockEditor,{Fragment:Kt}=wp.element,{TextControl:Xt}=wp.components;Yt("nhsblocks/backlink",{title:jt("Back Link","nhsblocks"),description:"Use back links to help users go back to the previous page in a multi-page transaction.",category:"nhsblocks",icon:Qt.back,keywords:[jt("Back Link previous question pages","nhsblocks"),jt("transactional services multi-page forms","nhsblocks")],example:{attributes:{backText:jt("Go back")}},attributes:{backText:{type:"string",source:"html",selector:".nhsuk-back-link span",default:"Go back"}},edit:t=>{const{className:n,setAttributes:a,isSelected:l,attributes:{backText:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-back-link"},(0,e.createElement)("a",{className:"nhsuk-back-link__link js-back-link"},Qt.back,s),l?(0,e.createElement)(Xt,{label:jt("Action Link Text","nhsblocks"),value:s,onChange:e=>a({backText:e})}):null)},save:t=>{const{attributes:{backText:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-back-link"},(0,e.createElement)("a",{className:"nhsuk-back-link__link js-back-link",onClick:"window.history.back()",href:"#"},Qt.back,(0,e.createElement)("span",null,n)))}})})()})();
     9content:nt("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},getEditWrapperProps:()=>({"data-align":"full"}),edit:t=>(0,e.createElement)("div",{className:"nhsuk-striped-blocks"},(0,e.createElement)(lt,{template:[["nhsblocks/stripeblock",{}]],allowedBlocks:["nhsblocks/stripeblock"]})),save:t=>(0,e.createElement)(lt.Content,null)}),at("nhsblocks/stripeblock",{title:nt("Stripe Block","nhsblocks"),description:nt("Inner block that allows alternate grey stripes","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"menu-alt",getEditWrapperProps:()=>({"data-align":"full"}),edit:t=>{const n=wp.blocks.getBlockTypes().map((e=>e.name)).filter((e=>"nhsblocks/stripeblock"!==e));return(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)(lt,{allowedBlocks:n}))},save:t=>(0,e.createElement)("section",{className:"nhsuk-section"},(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)(lt.Content,null)))});const{__:st}=wp.i18n,{registerBlockType:rt}=wp.blocks,{RichText:ct,URLInput:ot,InnerBlocks:it}=wp.blockEditor,{Fragment:ut}=wp.element,{TextControl:mt}=wp.components;rt("nhsblocks/contentslist",{title:st("Contents List","nhsblocks"),description:st("Use contents lists to allow users to navigate between related pages, for example about a single condition.","nhsblocks"),category:"nhsblocks",icon:"editor-ul",keywords:[st("Contents List","nhsblocks"),st("Navigation","nhsblocks"),st("Related pages","nhsblocks")],example:{innerBlocks:[{name:"nhsblocks/contentslistitem",attributes:{text:"About",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"Symptoms",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"When to see a doctor",url:"#"}}]},edit:t=>{const{className:n,setAttributes:a,attributes:{title:l}}=t;return(0,e.createElement)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide"},(0,e.createElement)("h2",{className:"nhsuk-u-visually-hidden"},st("Contents","nhsblocks")),(0,e.createElement)("ol",{className:"nhsuk-contents-list__list"},(0,e.createElement)(it,{template:[["nhsblocks/contentslistitem",{}]],allowedBlocks:["nhsblocks/contentslistitem"]})))},save:t=>(0,e.createElement)("nav",{className:"nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide"},(0,e.createElement)("h2",{className:"nhsuk-u-visually-hidden"},st("Contents","nhsblocks")),(0,e.createElement)("ol",{className:"nhsuk-contents-list__list"},(0,e.createElement)(it.Content,null)))}),rt("nhsblocks/contentslistitem",{title:st("Contents List Item","nhsblocks"),description:st("List Item to go into the contents list","nhsblocks"),category:"nhsblocks",icon:"editor-ul",parent:["nhsblocks/contentslist"],attributes:{text:{type:"array",source:"children",selector:".pagename"},url:{type:"string",source:"attribute",attribute:"href",selector:"a"}},edit:t=>{const{className:n,setAttributes:a,isSelected:l,attributes:{text:s,url:r}}=t;return(0,e.createElement)("li",{className:"nhsuk-contents-list__item"},l?(0,e.createElement)("div",null,(0,e.createElement)(mt,{id:"example-input-field",label:(st("Link Text"),"nhsblocks"),value:s,onChange:e=>a({text:e})}),(0,e.createElement)(ot,{className:"nhsuk-contents-list__link",value:r,onChange:e=>a({url:e}),placeholder:"Page Link (start typing to choose link)"})):(0,e.createElement)(ut,null,r?(0,e.createElement)("a",{className:"nhsuk-contents-list__link",href:"{ url }"},s):(0,e.createElement)("span",{className:"nhsuk-contents-list__current"},s)))},save:t=>{const{className:n,attributes:{text:a,url:l}}=t;return(0,e.createElement)(ut,null,l?(0,e.createElement)("li",{className:"nhsuk-contents-list__item"},(0,e.createElement)("a",{className:"pagename nhsuk-contents-list__link",href:l},a)):(0,e.createElement)("li",{className:"nhsuk-contents-list__item","aria-current":"page"},(0,e.createElement)("span",{className:"pagename nhsuk-contents-list__current"},a)))}});const{__:ht}=wp.i18n,{registerBlockType:dt}=wp.blocks,{RichText:kt,URLInput:pt,InnerBlocks:bt}=wp.blockEditor,{withSelect:gt,subscribe:Et,select:vt}=wp.data,{Fragment:_t}=wp.element,{Button:wt,TextControl:yt}=wp.components;dt("nhsblocks/contentslistpage",{title:ht("Contents List within a page","nhsblocks"),description:ht("Use contents lists to allow users to navigate sections within a page. This will automatically add all h2 tags on this page to a scrollable list ","nhsblocks"),category:"nhsblocks",icon:"editor-ul",example:{attributes:{h2titles:[{text:"Heading number one",url:"#1",id:"11111"},{text:"Heading number two",url:"#2",id:"22222"},{text:"Heading number three",url:"#3",id:"33333"}]}},attributes:{h2titles:{type:"array",default:[]}},keywords:[ht("Contents List Page","nhsblocks"),ht("Navigation","nhsblocks"),ht("Related sections on page","nhsblocks")],edit:gt((e=>({blocks:e("core/block-editor").getBlocks()})))((({blocks:t,className:n,setAttributes:a,attributes:{h2titles:l}})=>{const s=[];let r=0;const c=e=>{if("core/heading"===e.name&&2===e.attributes.level){const t="nhs-block-anchor-"+r++,n=e.attributes.content.replace(/<[^>]+>/g,"");s.push({text:n,url:t,id:e.clientId})}e.innerBlocks&&e.innerBlocks.map(c)};t.map(c);const o=l.length==s.length&&l.every((function(e,t){return s[t].text===e.text&&s[t].url===e.url}));return(0,e.createElement)("div",null,(0,e.createElement)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide"},(0,e.createElement)("h2",{className:"nhsuk-u-visually-hidden"},ht("Contents","nhsblocks")),(0,e.createElement)("ol",{className:"nhsuk-contents-list__list"},l?l.map((t=>(0,e.createElement)("li",{className:"nhsuk-contents-list__item",key:t.url},(0,e.createElement)("a",{className:"nhsuk-contents-list__link",href:"#"+t.url},t.text)))):(0,e.createElement)("p",null,"Press the button below to make a table of contents for this page"),(0,e.createElement)("p",null,(0,e.createElement)(wt,{onClick:()=>{a({h2titles:s});for(let e=s.length-1;e>=0;e--)vt("core/block-editor").getBlock(s[e].id).attributes.anchor=s[e].url},className:"is-primary",disabled:o},"Update Heading Block")))))})),save:e=>{const{attributes:{h2titles:t}}=e;return null}});const{__:Nt}=wp.i18n,{registerBlockType:xt}=wp.blocks,{format:Tt}=wp.date,{RichText:ft,InnerBlocks:Ct}=wp.blockEditor,{dispatch:Bt,subscribe:It,select:Lt,withSelect:Pt}=wp.data;xt("nhsblocks/reviewdate",{title:Nt("Review Date","nhsblocks"),category:"nhsblocks",icon:"update",example:{attributes:{lastSaved:Nt("5 July 1948")}},attributes:{lastSaved:{type:"string",source:"html",selector:".last-saved-date"}},edit:Pt((e=>({savedDate:e("core/editor").getEditedPostAttribute("modified")})))((({savedDate:t,className:n,setAttributes:a,attributes:{lastSaved:l}})=>{if(t){const n=new Date(t),s=Tt("d F Y",n);return l!==s&&(void 0===l?(a({lastSaved:s}),Bt("core/editor").savePost()):a({lastSaved:s})),(0,e.createElement)("div",{className:"nhsuk-review-date"},(0,e.createElement)("p",{className:"nhsuk-body-s"},"Page last reviewed:"," ",(0,e.createElement)("span",{className:"last-saved-date"},l)))}})),save:t=>{const{className:n,attributes:{lastSaved:a}}=t;return(0,e.createElement)("div",{className:"nhsuk-review-date"},(0,e.createElement)("p",{className:"nhsuk-body-s"},"Page last reviewed:"," ",(0,e.createElement)("span",{className:"last-saved-date"},a)))}}),n(574);const St={};St.left=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-left",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M4.1 12.3l2.7 3c.2.2.5.2.7 0 .1-.1.1-.2.1-.3v-2h11c.6 0 1-.4 1-1s-.4-1-1-1h-11V9c0-.2-.1-.4-.3-.5h-.2c-.1 0-.3.1-.4.2l-2.7 3c0 .2 0 .4.1.6z"})),St.right=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-right",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M19.6 11.66l-2.73-3A.51.51 0 0016 9v2H5a1 1 0 000 2h11v2a.5.5 0 00.32.46.39.39 0 00.18 0 .52.52 0 00.37-.16l2.73-3a.5.5 0 000-.64z"}));const At=St,{__:qt}=wp.i18n,{registerBlockType:Rt}=wp.blocks,{RichText:Dt,InnerBlocks:Ot}=wp.blockEditor,{Fragment:$t}=wp.element,{URLInput:Ht}=wp.blockEditor,{TextControl:Ut}=wp.components;Rt("nhsblocks/pagination",{title:qt("Pagination","nhsblocks"),category:"nhsblocks",icon:"arrow-right-alt",example:{attributes:{prevText:qt("Page Title"),nextText:qt("Page Title")}},attributes:{prevLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--prev"},nextLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--next"},prevText:{type:"string",source:"html",selector:".prev-text",default:"Page Title"},nextText:{type:"string",source:"html",selector:".next-text",default:"Page Title"}},edit:t=>{const{className:n,isSelected:a,setAttributes:l,attributes:{prevLink:s,nextLink:r,prevText:c,nextText:o}}=t;return(0,e.createElement)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination"},(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-pagination__list"},(0,e.createElement)("li",{className:"nhsuk-pagination-item--previous"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev"},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Previous","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page"},c),At.left),a?(0,e.createElement)($t,null,(0,e.createElement)(Ut,{label:(qt("Page Title"),"nhsblocks"),value:c,hideLabelFromVision:!0,onChange:e=>l({prevText:e})}),(0,e.createElement)(Ht,{className:"url",value:s,onChange:e=>l({prevLink:e})})):null),(0,e.createElement)("li",{className:"nhsuk-pagination-item--next"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next"},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Next","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page"},o),At.right),a?(0,e.createElement)($t,null,(0,e.createElement)(Ut,{label:(qt("Page Title"),"nhsblocks"),value:o,hideLabelFromVision:!0,onChange:e=>l({nextText:e})}),(0,e.createElement)(Ht,{className:"url",value:r,onChange:e=>l({nextLink:e})})):null)))},save:t=>{const{className:n,attributes:{prevLink:a,nextLink:l,prevText:s,nextText:r}}=t;return(0,e.createElement)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination"},(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-pagination__list"},(0,e.createElement)("li",{className:"nhsuk-pagination-item--previous"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev",href:a},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Previous","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page prev-text"},s),At.left)),(0,e.createElement)("li",{className:"nhsuk-pagination-item--next"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next",href:l},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Next","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page next-text"},r),At.right))))}});const Vt={};Vt.action=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__arrow-right-circle",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M12 2a10 10 0 00-9.95 9h11.64L9.74 7.05a1 1 0 011.41-1.41l5.66 5.65a1 1 0 010 1.42l-5.66 5.65a1 1 0 01-1.41 0 1 1 0 010-1.41L13.69 13H2.05A10 10 0 1012 2z"})),Vt.back=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__chevron-left",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M8.5 12c0-.3.1-.5.3-.7l5-5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L10.9 12l4.3 4.3c.4.4.4 1 0 1.4s-1 .4-1.4 0l-5-5c-.2-.2-.3-.4-.3-.7z"}));const Qt=Vt,{__:zt}=wp.i18n,{registerBlockType:Wt}=wp.blocks,{URLInput:Gt}=wp.blockEditor,{Fragment:Mt}=wp.element,{TextControl:Ft}=wp.components;Wt("nhsblocks/actionlink",{title:zt("Action Link","nhsblocks"),description:"Use action links to help users get to the next stage of a journey quickly by signposting the start of a digital service.",category:"nhsblocks",icon:Qt.action,keywords:[zt("signpost start","nhsblocks"),zt("transactional services multi-page forms","nhsblocks")],example:{attributes:{actionText:zt("Call to Action")}},attributes:{actionText:{type:"string",source:"html",selector:".nhsuk-action-link__text"},actionLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-action-link__link"},arrowsvgs:{type:"string",source:"html",selector:"svg",default:Qt.action}},edit:t=>{const{className:n,setAttributes:a,isSelected:l,attributes:{actionText:s,actionLink:r,arrowssvgs:c}}=t;return(0,e.createElement)("div",{className:"nhsuk-action-link"},(0,e.createElement)("a",{className:"nhsuk-action-link__link"},Qt.action,(0,e.createElement)("span",{className:"nhsuk-action-link__text"},s)),l?(0,e.createElement)("div",null,(0,e.createElement)(Ft,{label:zt(" ","nhsblocks"),placeholder:zt("Call to Action","nhsblocks"),value:s,onChange:e=>a({actionText:e})}),(0,e.createElement)(Gt,{value:r,placeholder:zt("Add a link (type to search or paste a whole url)","nhsblocks"),onChange:e=>a({actionLink:e})})):null)},save:t=>{const{className:n,attributes:{actionText:a,actionLink:l,arrowssvgs:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-action-link"},(0,e.createElement)("a",{className:"nhsuk-action-link__link",href:l},Qt.action,(0,e.createElement)("span",{className:"nhsuk-action-link__text"},a)))}});const{__:jt}=wp.i18n,{registerBlockType:Yt}=wp.blocks,{URLInput:Jt}=wp.blockEditor,{Fragment:Kt}=wp.element,{TextControl:Xt}=wp.components;Yt("nhsblocks/backlink",{title:jt("Back Link","nhsblocks"),description:"Use back links to help users go back to the previous page in a multi-page transaction.",category:"nhsblocks",icon:Qt.back,keywords:[jt("Back Link previous question pages","nhsblocks"),jt("transactional services multi-page forms","nhsblocks")],example:{attributes:{backText:jt("Go back")}},attributes:{backText:{type:"string",source:"html",selector:".nhsuk-back-link span",default:"Go back"}},edit:t=>{const{className:n,setAttributes:a,isSelected:l,attributes:{backText:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-back-link"},(0,e.createElement)("a",{className:"nhsuk-back-link__link js-back-link"},Qt.back,s),l?(0,e.createElement)(Xt,{label:jt("Action Link Text","nhsblocks"),value:s,onChange:e=>a({backText:e})}):null)},save:t=>{const{attributes:{backText:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-back-link"},(0,e.createElement)("a",{className:"nhsuk-back-link__link js-back-link",onClick:"window.history.back()",href:"#"},Qt.back,(0,e.createElement)("span",null,n)))}})})()})();
  • nhsblocks/tags/1.3.17/nhsblocks.php

    r3127995 r3196629  
    99 * Tested up to: 6.2
    1010 *
    11  * Version: 1.3.16
    12  * Stable tag: 1.3.16
     11 * Version: 1.3.17
     12 * Stable tag: 1.3.17
    1313 *
    1414 * @package nhsblocks
     
    1717defined( 'ABSPATH' ) || exit;
    1818
     19if (!function_exists('get_plugin_data')) {
     20    require_once ABSPATH . 'wp-admin/includes/plugin.php';
     21}
    1922/**
    2023 * Load translations (if any) for the plugin from the /languages/ folder.
  • nhsblocks/tags/1.3.17/readme.txt

    r3127995 r3196629  
    66Requires at least: 5.3
    77Tested up to: 6.6
    8 Stable tag: 1.3.16
     8Stable tag: 1.3.17
    99Requires PHP: 5.6
    1010License: GPLv3 or later
     
    5555
    5656== Changelog ==
     57
     58= 1.3.17 =
     59 * Fix error when trying to activate this plugin before theme selection
     60 * Security update
    5761
    5862= 1.3.16 =
  • nhsblocks/tags/1.3.17/style.css

    r3127995 r3196629  
    99Tags: NHS, NHS Digital, NHS Frontend, National Health Service, Leadership Academy
    1010Description: Gutenberg native custom blocks companion plugin for the NHS Nightingale theme (can also be standalone).
    11 Version: 1.3.16
     11Version: 1.3.17
    1212
    1313**********************************************************************************************/
  • nhsblocks/trunk/build/index.asset.php

    r3127995 r3196629  
    1 <?php return array('dependencies' => array('lodash', 'react'), 'version' => '0fba4a3fd14162328083');
     1<?php return array('dependencies' => array('lodash', 'react'), 'version' => '49619a2c5a6eff094434');
  • nhsblocks/trunk/build/index.js

    r3127995 r3196629  
    1 (()=>{var e={957:()=>{const{registerBlockStyle:e,unregisterBlockStyle:t}=wp.blocks;wp.domReady((()=>{t("core/image",["default","rounded"]),e("core/image",[{name:"nhsuk-image",label:"NHS Image",isDefault:!0},{name:"default",label:"Default"}]),t("core/table",["regular"]),e("core/table",[{name:"nhsuk-table-responsive",label:"NHS Table",isDefault:!0},{name:"default",label:"Default"}])}))}},t={};function n(a){var l=t[a];if(void 0!==l)return l.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,n),s.exports}(()=>{"use strict";const e=window.React,t=(window.lodash,wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"59.000",height:"30"}))),a=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"})),l=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"})),s=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"})),r=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"})),c=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"})),o=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"})),i=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"})),u=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"})),m=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"})),h=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,d=[{name:"fullwidth",label:__("Full Width","nhsblocks"),icon:t,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-full"}]]},{name:"twocols",label:__("Two Columns","nhsblocks"),isDefault:!0,icon:a,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threecols",label:__("Three Columns","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"}]]},{name:"twothreecols",label:__("Two Columns Then Three Columns","nhsblocks"),icon:c,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:s,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:r,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}=wp.i18n,{registerBlockType:p,createBlock:b}=wp.blocks,{RichText:g,InspectorControls:E,URLInputButton:v,ColorPalette:_,MediaUpload:w,InnerBlocks:y,__experimentalBlockVariationPicker:N}=wp.blockEditor,{useDispatch:x,useSelect:T}=wp.data;p("nhsblocks/dashboardnav",{title:k("Dashboard Navigation","nhsblocks"),category:"nhsblocks",icon:"tagcloud",example:{},attributes:{template:{type:"array"}},edit:t=>{const{clientId:n,name:a}=t,{attributes:{template:l},setAttributes:s}=t,{replaceInnerBlocks:r}=x("core/block-editor"),{blockType:c,defaultVariation:o,hasInnerBlocks:i,variations:u}=T((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:s}=e("core/blocks");return{blockType:l(a),defaultVariation:s(a,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(n).length>0,variations:t(a,"block")}}),[n,a]),m=e=>e.map((([e,t,n=[]])=>b(e,t,m(n))));return i?(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard"},(0,e.createElement)(y,{template:d}))):(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard"},(0,e.createElement)(N,{variations:d,onSelect:e=>{e.attributes&&t.setAttributes(e.attributes),e.innerBlocks&&r(t.clientId,m(e.innerBlocks))}})))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-dashboard"},(0,e.createElement)(y.Content,null)))}}),p("nhsblocks/dashpanel",{title:k("Dashboard Region","nhsblocks"),description:k("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:t=>{const{setAttributes:n,attributes:a,className:l}=t,{overlayColor:s,backgroundImage:r,panelTitle:c,panelLink:o}=a;return[(0,e.createElement)(E,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Add a link for this panel"),(0,e.createElement)(v,{className:"nhsblocks-dropdown__input",label:k("Dashboard Link","nhsblocks"),onChange:e=>{n({panelLink:e})},url:o})),(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Select a background image:"),(0,e.createElement)(w,{onSelect:function(e){n({backgroundImage:e.sizes.full.url})},type:"image",value:r,render:({open:t})=>(0,e.createElement)("button",{className:"button button-primary button-hero",onClick:t},"Upload Image!")})),(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"OR")," Select a background color: ",(0,e.createElement)("br",null),(0,e.createElement)("i",null,"(this will be ignored if you choose an image above)"),(0,e.createElement)(_,{value:s,onChange:function(e){n({overlayColor:e})}}))),(0,e.createElement)("div",{className:`${l} nhsuk-panel-group__item`},(0,e.createElement)("div",{className:"nhsuk-panel-with-label",style:{backgroundColor:`${s}`,backgroundImage:`url(${r})`,backgroundSize:"cover",backgroundPosition:"center"}},(0,e.createElement)("h3",{className:"nhsuk-panel-with-label__label"},(0,e.createElement)(g,{placeholder:k("Panel Title","nhsblocks"),value:c,onChange:e=>{n({panelTitle:e})}})),(0,e.createElement)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})))]},save:t=>{const{attributes:{overlayColor:n,backgroundImage:a,panelTitle:l,panelLink:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-panel-group__item"},(0,e.createElement)("a",{href:s,className:"nhsuk-promo__link-wrapper"},(0,e.createElement)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${n}`}},(0,e.createElement)("h3",{className:"nhsuk-panel-with-label__label"},(0,e.createElement)(g.Content,{value:l})),(0,e.createElement)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:l}))))},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:t})=>(0,e.createElement)("div",{className:"nhsuk-panel-group__item"},(0,e.createElement)("a",{href:t.panelLink,className:"nhsuk-promo__link-wrapper"},(0,e.createElement)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${t.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${t.overlayColor}`}},(0,e.createElement)("h3",{className:"nhsuk-panel-with-label__label"},"`$",t.panelTitle,"`"),(0,e.createElement)("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:t=>{const{attributes:{panelTitle:n},className:a,setAttributes:l}=t;return(0,e.createElement)("div",{className:"nhsuk-do-dont-list"},(0,e.createElement)("h3",{className:"nhsuk-do-dont-list__label"},(0,e.createElement)(B,{placeholder:f("Panel Title","nhsblocks"),value:n,onChange:e=>{l({panelTitle:e})}})),(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-list--cross"},(0,e.createElement)(I,{allowedBlocks:[]})))},save:t=>{const{attributes:{panelTitle:n,panelText:a}}=t;return(0,e.createElement)("div",{className:"nhsuk-do-dont-list"},(0,e.createElement)("h3",{className:"nhsuk-do-dont-list__label"},(0,e.createElement)(B.Content,{value:n})),(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-list--cross"},(0,e.createElement)(I.Content,null)))}}),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:t=>{const{attributes:{panelText:n},setAttributes:a}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},(0,e.createElement)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})),(0,e.createElement)("span",null,(0,e.createElement)(B,{placeholder:f("Text","nhsblocks"),value:n,onChange:e=>{a({panelText:e})}})))},save:t=>{const{attributes:{panelText:n}}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},(0,e.createElement)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})),(0,e.createElement)("span",null,(0,e.createElement)(B.Content,{value:n})))}}),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:t=>{const{attributes:{panelText:n},setAttributes:a}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},(0,e.createElement)("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,e.createElement)("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,e.createElement)("span",null,(0,e.createElement)(B,{placeholder:f("Text","nhsblocks"),value:n,onChange:e=>{a({panelText:e})}})))},save:t=>{const{attributes:{panelText:n}}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},(0,e.createElement)("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,e.createElement)("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,e.createElement)("span",null,(0,e.createElement)(B.Content,{value:n})))}});const{__:L}=wp.i18n,{registerBlockType:P}=wp.blocks,{RichText:S,InspectorControls:A,BlockControls:q,BlockVerticalAlignmentToolbar:R,URLInputButton:D}=wp.blockEditor;P("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:t=>{const{attributes:{buttonLabel:n,buttonLink:a,verticalAlignment:l},className:s,setAttributes:r}=t;return[(0,e.createElement)(A,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Add a link for this button by clicking the chain icon below."),(0,e.createElement)(D,{className:"nhsblocks-dropdown__input",label:L("Button URL","nhsblocks"),onChange:e=>{r({buttonLink:e})},url:a}))),(0,e.createElement)(q,null,(0,e.createElement)(R,{onChange:e=>{r({verticalAlignment:e})},value:l})),(0,e.createElement)("div",{className:`${s} nhsuk-button`},(0,e.createElement)(S,{value:n,onChange:e=>{r({buttonLabel:e})},placeholder:"Button label"}))]},save:t=>{const{attributes:{buttonLabel:n,buttonLink:a}}=t;return(0,e.createElement)("a",{href:a,className:"nhsuk-button"},(0,e.createElement)(S.Content,{value:n}))}});const{__:O}=wp.i18n,{registerBlockType:$}=wp.blocks,{RichText:H,InnerBlocks:U,InspectorControls:V,useBlockProps:Q}=wp.blockEditor,{ToggleControl:z,PanelBody:W,PanelRow:G,RadioControl:M,clientId:F}=wp.components,j=[["core/image",{align:"right",width:"150px"}]];$("nhsblocks/reveal1",{title:O("Simple Reveal","nhsblocks"),category:"nhsblocks",icon:"plus-alt",styles:[{name:"downarrow",label:O("Down Arrow"),isDefault:!0},{name:"expander",label:O("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:t=>{const n=Q(),{attributes:{revealTitle:a,revealText:l,withImage:s},className:r,setAttributes:c}=t;return[(0,e.createElement)(V,null,(0,e.createElement)(W,null,(0,e.createElement)(G,null,(0,e.createElement)(z,{label:"Include an image?",checked:s,onChange:e=>c({withImage:e})})))),(0,e.createElement)("details",{className:`${r} nhsuk-details newstyle`,open:!0},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},(0,e.createElement)(H,{placeholder:O("Reveal Title","nhsblocks"),value:a,onChange:e=>{c({revealTitle:e})}}))),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},!0===s&&(0,e.createElement)(U,{template:j}),(0,e.createElement)(H,{...n,placeholder:O("Reveal Contents","nhsblocks"),onChange:e=>{c({revealText:e})},value:l})))]},save:t=>{const n=Q.save(),{attributes:{revealTitle:a,revealText:l,withImage:s}}=t;return(0,e.createElement)("details",{className:"nhsuk-details"},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},(0,e.createElement)(H.Content,{value:a}))),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},!0===s&&(0,e.createElement)(U.Content,null),(0,e.createElement)(H.Content,{...n,value:l})))},deprecated:[{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:t})=>(0,e.createElement)("details",{className:"nhsuk-details"},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},"`$",t.revealTitle,"`")),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},"`$",t.revealText,"`"))},{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:t})=>(0,e.createElement)("details",{className:"nhsuk-details"},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},"`$",t.revealTitle,"`")),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},"`$",t.revealText,"`"))}]});const{__:Y}=wp.i18n,{registerBlockType:J}=wp.blocks,{RichText:K,InnerBlocks:X}=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:t=>{const{attributes:{panelTitle:n},className:a,setAttributes:l}=t;return(0,e.createElement)("div",{className:`${a} nhsuk-card`},(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",null,(0,e.createElement)(K,{placeholder:Y("Panel Title","nhsblocks"),value:n,onChange:e=>{l({panelTitle:e})}})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(X,{template:Z}))))},save:t=>{const{attributes:{panelTitle:n,className:a}}=t;return(0,e.createElement)("div",{className:`${a} nhsuk-card`},(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",null,(0,e.createElement)(K.Content,{value:n})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(X.Content,null))))},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},save:({attributes:t})=>(0,e.createElement)("div",{className:"nhsuk-panel"},(0,e.createElement)("h3",null,(0,e.createElement)(K.Content,{value:t.panelTitle})),(0,e.createElement)("div",{className:"paneltext"},(0,e.createElement)(X.Content,null)))}]});const{__:ee}=wp.i18n,{registerBlockType:te}=wp.blocks,{RichText:ne,InspectorControls:ae,BlockControls:le,BlockVerticalAlignmentToolbar:se}=wp.blockEditor;te("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:t=>{const{attributes:{tagLabel:n},className:a,setAttributes:l}=t;return[(0,e.createElement)("strong",{className:`${a} nhsuk-tag`},(0,e.createElement)(ne,{value:n,onChange:e=>{l({tagLabel:e})},placeholder:"Tag label"}))]},save:t=>{const{attributes:{tagLabel:n}}=t;return(0,e.createElement)("strong",{className:"nhsuk-tag"},(0,e.createElement)(ne.Content,{value:n}))}});const{__:re}=wp.i18n,{registerBlockType:ce}=wp.blocks,{URLInputButton:oe,RichText:ie,InnerBlocks:ue,MediaUpload:me,InspectorControls:he,useBlockProps:de}=wp.blockEditor;ce("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:t=>{const n=de(),{attributes:{promoTitle:a,promoText:l,promoLink:s},className:r,setAttributes:c}=t;return(0,e.createElement)("div",{className:`${r} nhsuk-card nhsuk-card--clickable`},(0,e.createElement)(ue,{allowedBlocks:["core/image"]}),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",{className:"nhsuk-card__heading nhsuk-heading-m"},(0,e.createElement)(oe,{className:"nhsblocks-dropdown__input",label:re("Panel Link","nhsblocks"),onChange:e=>{c({promoLink:e})},url:s}),(0,e.createElement)(ie,{placeholder:re("Promo Title","nhsblocks"),value:a,onChange:e=>{c({promoTitle:e})}})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(ie,{...n,placeholder:re("Promo Contents","nhsblocks"),onChange:e=>{c({promoText:e})},value:l}))))},save:t=>{const n=de.save(),{attributes:{promoTitle:a,promoText:l,promoLink:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-card nhsuk-card--clickable"},(0,e.createElement)(ue.Content,null),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",{className:"nhsuk-card__heading nhsuk-heading-m"},(0,e.createElement)("a",{href:s,className:"nhsuk-card__link"},(0,e.createElement)(ie.Content,{value:a}))),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(ie.Content,{...n,value:l}))))},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:t=>{const n=de.save(),{attributes:{promoTitle:a,promoText:l,promoLink:s}}=t;var r=a.replace("</a>","").replace("</a>","</a></a>");return(0,e.createElement)("div",{className:"nhsuk-card nhsuk-card--clickable"},(0,e.createElement)(ue.Content,null),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",{className:"nhsuk-card__heading nhsuk-heading-m"},(0,e.createElement)(ie.Content,{...n,value:r})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(ie.Content,{...n,value:l}))))}},{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:t})=>(0,e.createElement)("div",{className:"nhsuk-promo"},(0,e.createElement)("a",{href:t.promoLink,className:"nhsuk-promo__link-wrapper"},(0,e.createElement)("div",{className:"nhsuk-promo__content"},(0,e.createElement)(ue.Content,null),(0,e.createElement)("h3",{className:"nhsuk-promo__heading"},t.promoTitle),(0,e.createElement)("div",{className:"nhsuk-promo__description"},t.promoText))))}]});const{__:ke}=wp.i18n,pe=[["nhsblocks/promo1"]],be=[{name:"twocolspro",label:"nhsblocks",isDefault:!0,icon:a,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onehalfpro"]]},{name:"threecolspro",label:ke("Three Columns Promos","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"]]},{name:"one3two3pro",label:ke("One Third / Two Thirds Columns Promos","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/twothirdspro"]]},{name:"two3one3pro",label:ke("Two Thirds / One Third Columns Promos","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/twothirdspro"],["nhsblocks/onethirdpro"]]},{name:"one4one2one4pro",label:ke("One Quarter / One Half / One Quarter Columns Promos","nhsblocks"),icon:m,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"]]},{name:"one4one4one2pro",label:ke("One Quarter / One Quarter / One Half Columns Promos","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"]]},{name:"one2one4one4",label:ke("One Half / One Quarter / One Quarter Columns Promos","nhsblocks"),icon:u,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"]]}],{__:ge}=wp.i18n,{registerBlockType:Ee,createBlock:ve}=wp.blocks,{InnerBlocks:_e,__experimentalBlockVariationPicker:we}=wp.blockEditor,{useDispatch:ye,useSelect:Ne}=wp.data;Ee("nhsblocks/promogroup",{title:ge("Grouped Promos","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:t=>{const{clientId:n,name:a}=t,{attributes:{template:l},setAttributes:s}=t,{replaceInnerBlocks:r}=ye("core/block-editor"),{blockType:c,defaultVariation:o,hasInnerBlocks:i,variations:u}=Ne((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:s}=e("core/blocks");return{blockType:l(a),defaultVariation:s(a,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(n).length>0,variations:t(a,"block")}}),[n,a]),m=e=>e.map((([e,t,n=[]])=>ve(e,t,m(n))));return i?(0,e.createElement)("div",{className:"nhsuk-grid-row nhsuk-card-group"},(0,e.createElement)(_e,{template:be})):(0,e.createElement)("div",{className:"nhsuk-grid-row nhsuk-card-group"},(0,e.createElement)(we,{variations:be,onSelect:e=>{e.attributes&&t.setAttributes(e.attributes),e.innerBlocks&&r(t.clientId,m(e.innerBlocks))}}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-row nhsuk-card-group"},(0,e.createElement)(_e.Content,null))}}),Ee("nhsblocks/onehalfpro",{title:ge("One Half Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half  nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/onethirdpro",{title:ge("One Third Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/onequarterpro",{title:ge("One Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/twothirdspro",{title:ge("Two Thirds Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/threequarterspro",{title:ge("Three Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))});const{__:xe}=wp.i18n,{registerBlockType:Te}=wp.blocks,{RichText:fe,useBlockProps:Ce}=wp.blockEditor;Te("nhsblocks/quote1",{title:xe("Simple Quote","nhsblocks"),category:"nhsblocks",icon:"format-quote",styles:[{name:"standard",label:xe("Standard"),isDefault:!0},{name:"quote-reverse",label:xe("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:t=>{const n=Ce(),{attributes:{quoteName:a,quoteText:l},className:s,setAttributes:r}=t;return(0,e.createElement)("div",{className:`${s} nhsuk-inset-text`},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Quote / Testimonial:"," "),(0,e.createElement)("div",{className:"nhsuk-inset-text__quote"},(0,e.createElement)(fe,{...n,placeholder:xe("Quote","nhsblocks"),onChange:e=>{r({quoteText:e})},value:l})),(0,e.createElement)("span",{className:"nhsuk-inset-text__quote-attribution"},(0,e.createElement)(fe,{placeholder:xe("Quote Name","nhsblocks"),value:a,onChange:e=>{r({quoteName:e})}})))},save:t=>{const n=Ce.save(),{attributes:{quoteName:a,quoteText:l}}=t;return(0,e.createElement)("div",{className:"nhsuk-inset-text"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Quote / Testimonial:"," "),(0,e.createElement)("div",{className:"nhsuk-inset-text__quote"},(0,e.createElement)(fe.Content,{...n,value:l})),(0,e.createElement)("span",{className:"nhsuk-inset-text__quote-attribution"},(0,e.createElement)(fe.Content,{value:a})))}});const{__:Be}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{RichText:Le,InnerBlocks:Pe,InspectorControls:Se,useBlockProps:Ae}=wp.blockEditor,{ToggleControl:qe,PanelBody:Re,PanelRow:De,RadioControl:Oe}=wp.components,{withState:$e}=wp.compose,He=[["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:t=>{const n=Ae(),{attributes:{cardTitle:a,cardText:l,withImage:s},clientId:r,className:c,setAttributes:o}=t;return[(0,e.createElement)(Se,null,(0,e.createElement)(Re,null,(0,e.createElement)(De,null,(0,e.createElement)(qe,{label:"Include an image?",checked:s,onChange:e=>o({withImage:e})})))),(0,e.createElement)("div",{className:`${c} nhsuk-care-card`},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"text"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le,{placeholder:Be("Card Title","nhsblocks"),value:a,onChange:e=>{o({cardTitle:e})}})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},!0===s&&(0,e.createElement)(Pe,{template:He}),(0,e.createElement)(Le,{...n,placeholder:Be("Card Contents","nhsblocks"),onChange:e=>{o({cardText:e})},value:l})))]},save:t=>{const n=Ae.save(),{attributes:{cardTitle:a,cardText:l,withImage:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",null,(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:a})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},!0===s&&(0,e.createElement)(Pe.Content,null),(0,e.createElement)(Le.Content,{...n,value:l})))},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:t})=>(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"heading","aria-level":"3"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},(0,e.createElement)(Le.Content,{multiline:"p",value:t.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:t})=>(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"text"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},(0,e.createElement)(Le.Content,{multiline:"p",value:t.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:t})=>(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"heading"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},(0,e.createElement)(Le.Content,{multiline:"p",value:t.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:t})=>(0,e.createElement)("div",{className:"nhsuk-card nhsuk-card--care"},(0,e.createElement)("div",{className:"nhsuk-card--care__heading-container"},(0,e.createElement)("h2",{className:"nhsuk-card--care__heading"},(0,e.createElement)("span",{role:"text",className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle}))),(0,e.createElement)("span",{className:"nhsuk-card--care__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)(Le.Content,{...Ae.save(),multiline:"p",value:t.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{__:Ue}=wp.i18n,Ve=[{name:"twocols",label:"nhsblocks",isDefault:!0,icon:a,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onehalf"]]},{name:"threecols",label:Ue("Three Columns Generic","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/onethird"],["nhsblocks/onethird"]]},{name:"one3two3",label:Ue("One Third / Two Thirds Columns Generic","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/twothirds"]]},{name:"two3one3",label:Ue("Two Thirds / One Third Columns Generic","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/twothirds"],["nhsblocks/onethird"]]},{name:"one4one2one4",label:Ue("One Quarter / One Half / One Quarter Columns Generic","nhsblocks"),icon:m,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onehalf"],["nhsblocks/onequarter"]]},{name:"one4one4one2",label:Ue("One Quarter / One Quarter / One Half Columns Generic","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onequarter"],["nhsblocks/onehalf"]]},{name:"one2one4one4",label:Ue("One Half / One Quarter / One Quarter Columns Generic","nhsblocks"),icon:u,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onequarter"],["nhsblocks/onequarter"]]}],{__:Qe}=wp.i18n,{registerBlockType:ze,createBlock:We}=wp.blocks,{InnerBlocks:Ge,__experimentalBlockVariationPicker:Me}=wp.blockEditor,{useDispatch:Fe,useSelect:je}=wp.data;ze("nhsblocks/rowgroup",{title:Qe("Grouped Items","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:t=>{const{clientId:n,name:a}=t,{attributes:{template:l},setAttributes:s}=t,{replaceInnerBlocks:r}=Fe("core/block-editor"),{blockType:c,defaultVariation:o,hasInnerBlocks:i,variations:u}=je((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:s}=e("core/blocks");return{blockType:l(a),defaultVariation:s(a,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(n).length>0,variations:t(a,"block")}}),[n,a]),m=e=>e.map((([e,t,n=[]])=>We(e,t,m(n))));return i?(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full"},(0,e.createElement)(Ge,{template:Ve}))):(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full"},(0,e.createElement)(Me,{variations:Ve,onSelect:e=>{e.attributes&&t.setAttributes(e.attributes),e.innerBlocks&&r(t.clientId,m(e.innerBlocks))}})))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full"},(0,e.createElement)(Ge.Content,null)))}}),ze("nhsblocks/onehalf",{title:Qe("One Half Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/onethird",{title:Qe("One Third Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/onequarter",{title:Qe("One Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/twothirds",{title:Qe("Two Thirds Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/threequarters",{title:Qe("Three Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters"},(0,e.createElement)(Ge.Content,null))}});const{__:Ye}=wp.i18n,{registerBlockType:Je}=wp.blocks,{RichText:Ke,InspectorControls:Xe,ColorPalette:Ze,MediaUpload:et,InnerBlocks:tt}=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:t=>{const{setAttributes:n,attributes:a,className:l}=t,{overlayColor:s,backgroundImage:r}=a;return[(0,e.createElement)(Xe,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Select a background image:"),(0,e.createElement)(et,{onSelect:function(e){n({backgroundImage:e.sizes.full.url})},type:"image",value:r,render:({open:t})=>(0,e.createElement)("button",{className:"button button-primary button-hero",onClick:t},"Upload Image!")})),(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"OR")," Select a background color: ",(0,e.createElement)("br",null),(0,e.createElement)("i",null,"(this will be ignored if you chose an image above)"),(0,e.createElement)(Ze,{value:s,onChange:function(e){n({overlayColor:e})}}))),(0,e.createElement)("section",{className:`${l}  nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description`,style:{backgroundColor:`${s}`,backgroundImage:`url(${r})`,backgroundSize:"cover",backgroundPosition:"center"}},(0,e.createElement)("div",{className:"nhsuk-hero__overlay"},(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(tt,{template:[["nhsblocks/heroinner",{}]]}))))))]},save:t=>{const{attributes:n,className:a}=t,{overlayColor:l,backgroundImage:s}=n;return(0,e.createElement)("section",{className:"nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description",style:{backgroundImage:`url(${s})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${l}`}},(0,e.createElement)("div",{className:"nhsuk-hero__overlay"},(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(tt.Content,null))))))}}),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:t=>{const{setAttributes:n,attributes:a,className:l}=t,{fontColor:s}=a;return[(0,e.createElement)(Xe,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Select a font color:"),(0,e.createElement)(Ze,{value:s,onChange:function(e){n({fontColor:e})}}))),(0,e.createElement)("div",{className:"nhsuk-hero-content"},(0,e.createElement)(Ke,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",value:a.texttitle,onChange:function(e){n({texttitle:e})},placeholder:"Enter your text here!",style:{color:s}}),(0,e.createElement)(Ke,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",value:a.texttext,onChange:function(e){n({texttext:e})},placeholder:"Enter your text here!",style:{color:s}}),(0,e.createElement)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"}))]},save:t=>{const{attributes:n,className:a}=t,{fontColor:l}=n;return(0,e.createElement)("div",{className:"nhsuk-hero-content"},(0,e.createElement)(Ke.Content,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",style:{color:l},value:n.texttitle}),(0,e.createElement)(Ke.Content,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",style:{color:l},value:n.texttext}),(0,e.createElement)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"}))}});const{__:nt}=wp.i18n,{registerBlockType:at}=wp.blocks,{InnerBlocks:lt}=wp.blockEditor;at("nhsblocks/stripesblock",{title:nt("Stripes Block","nhsblocks"),description:nt("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:t}=wp.blocks;wp.domReady((()=>{t("core/image",["default","rounded"]),e("core/image",[{name:"nhsuk-image",label:"NHS Image",isDefault:!0},{name:"default",label:"Default"}]),t("core/table",["regular"]),e("core/table",[{name:"nhsuk-table-responsive",label:"NHS Table",isDefault:!0},{name:"default",label:"Default"}])}))}},t={};function n(a){var l=t[a];if(void 0!==l)return l.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,n),s.exports}(()=>{"use strict";const e=window.React,t=(window.lodash,wp.element.createElement("svg",{width:60,height:30},wp.element.createElement("rect",{x:"0.000",y:"0.000",width:"59.000",height:"30"}))),a=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"})),l=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"})),s=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"})),r=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"})),c=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"})),o=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"})),i=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"})),u=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"})),m=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"})),h=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,d=[{name:"fullwidth",label:__("Full Width","nhsblocks"),icon:t,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-full"}]]},{name:"twocols",label:__("Two Columns","nhsblocks"),isDefault:!0,icon:a,innerBlocks:[["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}],["nhsblocks/dashpanel",{className:"nhsuk-grid-column-one-half"}]]},{name:"threecols",label:__("Three Columns","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"}]]},{name:"twothreecols",label:__("Two Columns Then Three Columns","nhsblocks"),icon:c,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:s,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:r,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}=wp.i18n,{registerBlockType:p,createBlock:b}=wp.blocks,{RichText:g,InspectorControls:E,URLInputButton:v,ColorPalette:_,MediaUpload:w,InnerBlocks:y,__experimentalBlockVariationPicker:N}=wp.blockEditor,{useDispatch:x,useSelect:T}=wp.data;p("nhsblocks/dashboardnav",{title:k("Dashboard Navigation","nhsblocks"),category:"nhsblocks",icon:"tagcloud",example:{},attributes:{template:{type:"array"}},edit:t=>{const{clientId:n,name:a}=t,{attributes:{template:l},setAttributes:s}=t,{replaceInnerBlocks:r}=x("core/block-editor"),{blockType:c,defaultVariation:o,hasInnerBlocks:i,variations:u}=T((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:s}=e("core/blocks");return{blockType:l(a),defaultVariation:s(a,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(n).length>0,variations:t(a,"block")}}),[n,a]),m=e=>e.map((([e,t,n=[]])=>b(e,t,m(n))));return i?(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard"},(0,e.createElement)(y,{template:d}))):(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full nhsuk-dashboard"},(0,e.createElement)(N,{variations:d,onSelect:e=>{e.attributes&&t.setAttributes(e.attributes),e.innerBlocks&&r(t.clientId,m(e.innerBlocks))}})))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-dashboard"},(0,e.createElement)(y.Content,null)))}}),p("nhsblocks/dashpanel",{title:k("Dashboard Region","nhsblocks"),description:k("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:t=>{const{setAttributes:n,attributes:a,className:l}=t,{overlayColor:s,backgroundImage:r,panelTitle:c,panelLink:o}=a;return[(0,e.createElement)(E,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Add a link for this panel"),(0,e.createElement)(v,{className:"nhsblocks-dropdown__input",label:k("Dashboard Link","nhsblocks"),onChange:e=>{n({panelLink:e})},url:o})),(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Select a background image:"),(0,e.createElement)(w,{onSelect:function(e){n({backgroundImage:e.sizes.full.url})},type:"image",value:r,render:({open:t})=>(0,e.createElement)("button",{className:"button button-primary button-hero",onClick:t},"Upload Image!")})),(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"OR")," Select a background color: ",(0,e.createElement)("br",null),(0,e.createElement)("i",null,"(this will be ignored if you choose an image above)"),(0,e.createElement)(_,{value:s,onChange:function(e){n({overlayColor:e})}}))),(0,e.createElement)("div",{className:`${l} nhsuk-panel-group__item`},(0,e.createElement)("div",{className:"nhsuk-panel-with-label",style:{backgroundColor:`${s}`,backgroundImage:`url(${r})`,backgroundSize:"cover",backgroundPosition:"center"}},(0,e.createElement)("h3",{className:"nhsuk-panel-with-label__label"},(0,e.createElement)(g,{placeholder:k("Panel Title","nhsblocks"),value:c,onChange:e=>{n({panelTitle:e})}})),(0,e.createElement)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:""})))]},save:t=>{const{attributes:{overlayColor:n,backgroundImage:a,panelTitle:l,panelLink:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-panel-group__item"},(0,e.createElement)("a",{href:s,className:"nhsuk-promo__link-wrapper"},(0,e.createElement)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${n}`}},(0,e.createElement)("h3",{className:"nhsuk-panel-with-label__label"},(0,e.createElement)(g.Content,{value:l})),(0,e.createElement)("img",{src:"/wp-content/plugins/nhsblocks/assets/pixel_trans.png",className:"nhsuk-dashboard__image",alt:l}))))},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:t})=>(0,e.createElement)("div",{className:"nhsuk-panel-group__item"},(0,e.createElement)("a",{href:t.panelLink,className:"nhsuk-promo__link-wrapper"},(0,e.createElement)("div",{className:"nhsuk-panel-with-label",style:{backgroundImage:`url(${t.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${t.overlayColor}`}},(0,e.createElement)("h3",{className:"nhsuk-panel-with-label__label"},"`$",t.panelTitle,"`"),(0,e.createElement)("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:t=>{const{attributes:{panelTitle:n},className:a,setAttributes:l}=t;return(0,e.createElement)("div",{className:"nhsuk-do-dont-list"},(0,e.createElement)("h3",{className:"nhsuk-do-dont-list__label"},(0,e.createElement)(B,{placeholder:f("Panel Title","nhsblocks"),value:n,onChange:e=>{l({panelTitle:e})}})),(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-list--cross"},(0,e.createElement)(I,{allowedBlocks:[]})))},save:t=>{const{attributes:{panelTitle:n,panelText:a}}=t;return(0,e.createElement)("div",{className:"nhsuk-do-dont-list"},(0,e.createElement)("h3",{className:"nhsuk-do-dont-list__label"},(0,e.createElement)(B.Content,{value:n})),(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-list--cross"},(0,e.createElement)(I.Content,null)))}}),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:t=>{const{attributes:{panelText:n},setAttributes:a}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},(0,e.createElement)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})),(0,e.createElement)("span",null,(0,e.createElement)(B,{placeholder:f("Text","nhsblocks"),value:n,onChange:e=>{a({panelText:e})}})))},save:t=>{const{attributes:{panelText:n}}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__tick",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},(0,e.createElement)("path",{strokeWidth:"4",strokeLinecap:"round",d:"M18.4 7.8l-8.5 8.4L5.6 12"})),(0,e.createElement)("span",null,(0,e.createElement)(B.Content,{value:n})))}}),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:t=>{const{attributes:{panelText:n},setAttributes:a}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},(0,e.createElement)("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,e.createElement)("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,e.createElement)("span",null,(0,e.createElement)(B,{placeholder:f("Text","nhsblocks"),value:n,onChange:e=>{a({panelText:e})}})))},save:t=>{const{attributes:{panelText:n}}=t;return(0,e.createElement)("li",null,(0,e.createElement)("svg",{className:"nhsuk-icon nhsuk-icon__cross",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},(0,e.createElement)("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,e.createElement)("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,e.createElement)("span",null,(0,e.createElement)(B.Content,{value:n})))}});const{__:L}=wp.i18n,{registerBlockType:P}=wp.blocks,{RichText:S,InspectorControls:A,BlockControls:q,BlockVerticalAlignmentToolbar:R,URLInputButton:D}=wp.blockEditor;P("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:t=>{const{attributes:{buttonLabel:n,buttonLink:a,verticalAlignment:l},className:s,setAttributes:r}=t;return[(0,e.createElement)(A,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Add a link for this button by clicking the chain icon below."),(0,e.createElement)(D,{className:"nhsblocks-dropdown__input",label:L("Button URL","nhsblocks"),onChange:e=>{r({buttonLink:e})},url:a}))),(0,e.createElement)(q,null,(0,e.createElement)(R,{onChange:e=>{r({verticalAlignment:e})},value:l})),(0,e.createElement)("div",{className:`${s} nhsuk-button`},(0,e.createElement)(S,{value:n,onChange:e=>{r({buttonLabel:e})},placeholder:"Button label"}))]},save:t=>{const{attributes:{buttonLabel:n,buttonLink:a}}=t;return(0,e.createElement)("a",{href:a,className:"nhsuk-button"},(0,e.createElement)(S.Content,{value:n}))}});const{__:O}=wp.i18n,{registerBlockType:$}=wp.blocks,{RichText:H,InnerBlocks:U,InspectorControls:V,useBlockProps:Q}=wp.blockEditor,{ToggleControl:z,PanelBody:W,PanelRow:G,RadioControl:M,clientId:F}=wp.components,j=[["core/image",{align:"right",width:"150px"}]];$("nhsblocks/reveal1",{title:O("Simple Reveal","nhsblocks"),category:"nhsblocks",icon:"plus-alt",styles:[{name:"downarrow",label:O("Down Arrow"),isDefault:!0},{name:"expander",label:O("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:t=>{const n=Q(),{attributes:{revealTitle:a,revealText:l,withImage:s},className:r,setAttributes:c}=t;return[(0,e.createElement)(V,null,(0,e.createElement)(W,null,(0,e.createElement)(G,null,(0,e.createElement)(z,{label:"Include an image?",checked:s,onChange:e=>c({withImage:e})})))),(0,e.createElement)("details",{className:`${r} nhsuk-details newstyle`,open:!0},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},(0,e.createElement)(H,{placeholder:O("Reveal Title","nhsblocks"),value:a,onChange:e=>{c({revealTitle:e})}}))),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},!0===s&&(0,e.createElement)(U,{template:j}),(0,e.createElement)(H,{...n,placeholder:O("Reveal Contents","nhsblocks"),onChange:e=>{c({revealText:e})},value:l})))]},save:t=>{const n=Q.save(),{attributes:{revealTitle:a,revealText:l,withImage:s}}=t;return(0,e.createElement)("details",{className:"nhsuk-details"},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},(0,e.createElement)(H.Content,{value:a}))),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},!0===s&&(0,e.createElement)(U.Content,null),(0,e.createElement)(H.Content,{...n,value:l})))},deprecated:[{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:t})=>(0,e.createElement)("details",{className:"nhsuk-details"},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button","aria-controls":"details-content-","aria-expanded":"false"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},"`$",t.revealTitle,"`")),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},"`$",t.revealText,"`"))},{attributes:{revealTitle:{type:"string",source:"html",selector:".nhsuk-details__summary-text"},revealText:{type:"string",source:"html",selector:".nhsuk-details__text"}},save:({attributes:t})=>(0,e.createElement)("details",{className:"nhsuk-details"},(0,e.createElement)("summary",{className:"nhsuk-details__summary",role:"button"},(0,e.createElement)("span",{className:"nhsuk-details__summary-text"},"`$",t.revealTitle,"`")),(0,e.createElement)("div",{className:"nhsuk-details__text",id:"details-content-","aria-hidden":"false"},"`$",t.revealText,"`"))}]});const{__:Y}=wp.i18n,{registerBlockType:J}=wp.blocks,{RichText:K,InnerBlocks:X}=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:t=>{const{attributes:{panelTitle:n},className:a,setAttributes:l}=t;return(0,e.createElement)("div",{className:`${a} nhsuk-card`},(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",null,(0,e.createElement)(K,{placeholder:Y("Panel Title","nhsblocks"),value:n,onChange:e=>{l({panelTitle:e})}})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(X,{template:Z}))))},save:t=>{const{attributes:{panelTitle:n,className:a}}=t;return(0,e.createElement)("div",{className:`${a} nhsuk-card`},(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",null,(0,e.createElement)(K.Content,{value:n})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(X.Content,null))))},deprecated:[{attributes:{panelTitle:{type:"string",source:"html",selector:"h3"}},save:({attributes:t})=>(0,e.createElement)("div",{className:"nhsuk-panel"},(0,e.createElement)("h3",null,(0,e.createElement)(K.Content,{value:t.panelTitle})),(0,e.createElement)("div",{className:"paneltext"},(0,e.createElement)(X.Content,null)))}]});const{__:ee}=wp.i18n,{registerBlockType:te}=wp.blocks,{RichText:ne,InspectorControls:ae,BlockControls:le,BlockVerticalAlignmentToolbar:se}=wp.blockEditor;te("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:t=>{const{attributes:{tagLabel:n},className:a,setAttributes:l}=t;return[(0,e.createElement)("strong",{className:`${a} nhsuk-tag`},(0,e.createElement)(ne,{value:n,onChange:e=>{l({tagLabel:e})},placeholder:"Tag label"}))]},save:t=>{const{attributes:{tagLabel:n}}=t;return(0,e.createElement)("strong",{className:"nhsuk-tag"},(0,e.createElement)(ne.Content,{value:n}))}});const{__:re}=wp.i18n,{registerBlockType:ce}=wp.blocks,{URLInputButton:oe,RichText:ie,InnerBlocks:ue,MediaUpload:me,InspectorControls:he,useBlockProps:de}=wp.blockEditor;ce("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:t=>{const n=de(),{attributes:{promoTitle:a,promoText:l,promoLink:s},className:r,setAttributes:c}=t;return(0,e.createElement)("div",{className:`${r} nhsuk-card nhsuk-card--clickable`},(0,e.createElement)(ue,{allowedBlocks:["core/image"]}),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",{className:"nhsuk-card__heading nhsuk-heading-m"},(0,e.createElement)(oe,{className:"nhsblocks-dropdown__input",label:re("Panel Link","nhsblocks"),onChange:e=>{c({promoLink:e})},url:s}),(0,e.createElement)(ie,{placeholder:re("Promo Title","nhsblocks"),value:a,onChange:e=>{c({promoTitle:e})}})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(ie,{...n,placeholder:re("Promo Contents","nhsblocks"),onChange:e=>{c({promoText:e})},value:l}))))},save:t=>{const n=de.save(),{attributes:{promoTitle:a,promoText:l,promoLink:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-card nhsuk-card--clickable"},(0,e.createElement)(ue.Content,null),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",{className:"nhsuk-card__heading nhsuk-heading-m"},(0,e.createElement)("a",{href:s,className:"nhsuk-card__link"},(0,e.createElement)(ie.Content,{value:a}))),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(ie.Content,{...n,value:l}))))},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:t=>{const n=de.save(),{attributes:{promoTitle:a,promoText:l,promoLink:s}}=t;var r=a.replace("</a>","").replace("</a>","</a></a>");return(0,e.createElement)("div",{className:"nhsuk-card nhsuk-card--clickable"},(0,e.createElement)(ue.Content,null),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)("h2",{className:"nhsuk-card__heading nhsuk-heading-m"},(0,e.createElement)(ie.Content,{...n,value:r})),(0,e.createElement)("div",{className:"nhsuk-card__description"},(0,e.createElement)(ie.Content,{...n,value:l}))))}},{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:t})=>(0,e.createElement)("div",{className:"nhsuk-promo"},(0,e.createElement)("a",{href:t.promoLink,className:"nhsuk-promo__link-wrapper"},(0,e.createElement)("div",{className:"nhsuk-promo__content"},(0,e.createElement)(ue.Content,null),(0,e.createElement)("h3",{className:"nhsuk-promo__heading"},t.promoTitle),(0,e.createElement)("div",{className:"nhsuk-promo__description"},t.promoText))))}]});const{__:ke}=wp.i18n,pe=[["nhsblocks/promo1"]],be=[{name:"twocolspro",label:"nhsblocks",isDefault:!0,icon:a,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onehalfpro"]]},{name:"threecolspro",label:ke("Three Columns Promos","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"],["nhsblocks/onethirdpro"]]},{name:"one3two3pro",label:ke("One Third / Two Thirds Columns Promos","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/onethirdpro"],["nhsblocks/twothirdspro"]]},{name:"two3one3pro",label:ke("Two Thirds / One Third Columns Promos","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/twothirdspro"],["nhsblocks/onethirdpro"]]},{name:"one4one2one4pro",label:ke("One Quarter / One Half / One Quarter Columns Promos","nhsblocks"),icon:m,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"]]},{name:"one4one4one2pro",label:ke("One Quarter / One Quarter / One Half Columns Promos","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"],["nhsblocks/onehalfpro"]]},{name:"one2one4one4",label:ke("One Half / One Quarter / One Quarter Columns Promos","nhsblocks"),icon:u,innerBlocks:[["nhsblocks/onehalfpro"],["nhsblocks/onequarterpro"],["nhsblocks/onequarterpro"]]}],{__:ge}=wp.i18n,{registerBlockType:Ee,createBlock:ve}=wp.blocks,{InnerBlocks:_e,__experimentalBlockVariationPicker:we}=wp.blockEditor,{useDispatch:ye,useSelect:Ne}=wp.data;Ee("nhsblocks/promogroup",{title:ge("Grouped Promos","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:t=>{const{clientId:n,name:a}=t,{attributes:{template:l},setAttributes:s}=t,{replaceInnerBlocks:r}=ye("core/block-editor"),{blockType:c,defaultVariation:o,hasInnerBlocks:i,variations:u}=Ne((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:s}=e("core/blocks");return{blockType:l(a),defaultVariation:s(a,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(n).length>0,variations:t(a,"block")}}),[n,a]),m=e=>e.map((([e,t,n=[]])=>ve(e,t,m(n))));return i?(0,e.createElement)("div",{className:"nhsuk-grid-row nhsuk-card-group"},(0,e.createElement)(_e,{template:be})):(0,e.createElement)("div",{className:"nhsuk-grid-row nhsuk-card-group"},(0,e.createElement)(we,{variations:be,onSelect:e=>{e.attributes&&t.setAttributes(e.attributes),e.innerBlocks&&r(t.clientId,m(e.innerBlocks))}}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-row nhsuk-card-group"},(0,e.createElement)(_e.Content,null))}}),Ee("nhsblocks/onehalfpro",{title:ge("One Half Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half  nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/onethirdpro",{title:ge("One Third Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/onequarterpro",{title:ge("One Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/twothirdspro",{title:ge("Two Thirds Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))}),Ee("nhsblocks/threequarterspro",{title:ge("Three Quarter Promo","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/promogroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item"},(0,e.createElement)(_e,{template:pe,templateLock:"all"}))},save:t=>(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters nhsuk-card-group__item"},(0,e.createElement)(_e.Content,null))});const{__:xe}=wp.i18n,{registerBlockType:Te}=wp.blocks,{RichText:fe,useBlockProps:Ce}=wp.blockEditor;Te("nhsblocks/quote1",{title:xe("Simple Quote","nhsblocks"),category:"nhsblocks",icon:"format-quote",styles:[{name:"standard",label:xe("Standard"),isDefault:!0},{name:"quote-reverse",label:xe("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:t=>{const n=Ce(),{attributes:{quoteName:a,quoteText:l},className:s,setAttributes:r}=t;return(0,e.createElement)("div",{className:`${s} nhsuk-inset-text`},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Quote / Testimonial:"," "),(0,e.createElement)("div",{className:"nhsuk-inset-text__quote"},(0,e.createElement)(fe,{...n,placeholder:xe("Quote","nhsblocks"),onChange:e=>{r({quoteText:e})},value:l})),(0,e.createElement)("span",{className:"nhsuk-inset-text__quote-attribution"},(0,e.createElement)(fe,{placeholder:xe("Quote Name","nhsblocks"),value:a,onChange:e=>{r({quoteName:e})}})))},save:t=>{const n=Ce.save(),{attributes:{quoteName:a,quoteText:l}}=t;return(0,e.createElement)("div",{className:"nhsuk-inset-text"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Quote / Testimonial:"," "),(0,e.createElement)("div",{className:"nhsuk-inset-text__quote"},(0,e.createElement)(fe.Content,{...n,value:l})),(0,e.createElement)("span",{className:"nhsuk-inset-text__quote-attribution"},(0,e.createElement)(fe.Content,{value:a})))}});const{__:Be}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{RichText:Le,InnerBlocks:Pe,InspectorControls:Se,useBlockProps:Ae}=wp.blockEditor,{ToggleControl:qe,PanelBody:Re,PanelRow:De,RadioControl:Oe}=wp.components,{withState:$e}=wp.compose,He=[["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:t=>{const n=Ae(),{attributes:{cardTitle:a,cardText:l,withImage:s},clientId:r,className:c,setAttributes:o}=t;return[(0,e.createElement)(Se,null,(0,e.createElement)(Re,null,(0,e.createElement)(De,null,(0,e.createElement)(qe,{label:"Include an image?",checked:s,onChange:e=>o({withImage:e})})))),(0,e.createElement)("div",{className:`${c} nhsuk-care-card`},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"text"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le,{placeholder:Be("Card Title","nhsblocks"),value:a,onChange:e=>{o({cardTitle:e})}})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},!0===s&&(0,e.createElement)(Pe,{template:He}),(0,e.createElement)(Le,{...n,placeholder:Be("Card Contents","nhsblocks"),onChange:e=>{o({cardText:e})},value:l})))]},save:t=>{const n=Ae.save(),{attributes:{cardTitle:a,cardText:l,withImage:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",null,(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:a})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},!0===s&&(0,e.createElement)(Pe.Content,null),(0,e.createElement)(Le.Content,{...n,value:l})))},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:t})=>(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"heading","aria-level":"3"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},(0,e.createElement)(Le.Content,{multiline:"p",value:t.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:t})=>(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"text"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},(0,e.createElement)(Le.Content,{multiline:"p",value:t.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:t})=>(0,e.createElement)("div",{className:"nhsuk-grid-column-width nhsuk-care-card nhsuk-care-card--type"},(0,e.createElement)("div",{className:"nhsuk-care-card__heading-container"},(0,e.createElement)("h3",{className:"nhsuk-care-card__heading"},(0,e.createElement)("span",{role:"heading"},(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},"Non-urgent advice: "),(0,e.createElement)("span",{className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle})))),(0,e.createElement)("span",{className:"nhsuk-care-card__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-care-card__content"},(0,e.createElement)(Le.Content,{multiline:"p",value:t.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:t})=>(0,e.createElement)("div",{className:"nhsuk-card nhsuk-card--care"},(0,e.createElement)("div",{className:"nhsuk-card--care__heading-container"},(0,e.createElement)("h2",{className:"nhsuk-card--care__heading"},(0,e.createElement)("span",{role:"text",className:"nhsuk-care-card__heading-text"},(0,e.createElement)(Le.Content,{value:t.cardTitle}))),(0,e.createElement)("span",{className:"nhsuk-card--care__arrow","aria-hidden":"true"})),(0,e.createElement)("div",{className:"nhsuk-card__content"},(0,e.createElement)(Le.Content,{...Ae.save(),multiline:"p",value:t.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{__:Ue}=wp.i18n,Ve=[{name:"twocols",label:"nhsblocks",isDefault:!0,icon:a,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onehalf"]]},{name:"threecols",label:Ue("Three Columns Generic","nhsblocks"),icon:l,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/onethird"],["nhsblocks/onethird"]]},{name:"one3two3",label:Ue("One Third / Two Thirds Columns Generic","nhsblocks"),icon:o,innerBlocks:[["nhsblocks/onethird"],["nhsblocks/twothirds"]]},{name:"two3one3",label:Ue("Two Thirds / One Third Columns Generic","nhsblocks"),icon:i,innerBlocks:[["nhsblocks/twothirds"],["nhsblocks/onethird"]]},{name:"one4one2one4",label:Ue("One Quarter / One Half / One Quarter Columns Generic","nhsblocks"),icon:m,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onehalf"],["nhsblocks/onequarter"]]},{name:"one4one4one2",label:Ue("One Quarter / One Quarter / One Half Columns Generic","nhsblocks"),icon:h,innerBlocks:[["nhsblocks/onequarter"],["nhsblocks/onequarter"],["nhsblocks/onehalf"]]},{name:"one2one4one4",label:Ue("One Half / One Quarter / One Quarter Columns Generic","nhsblocks"),icon:u,innerBlocks:[["nhsblocks/onehalf"],["nhsblocks/onequarter"],["nhsblocks/onequarter"]]}],{__:Qe}=wp.i18n,{registerBlockType:ze,createBlock:We}=wp.blocks,{InnerBlocks:Ge,__experimentalBlockVariationPicker:Me}=wp.blockEditor,{useDispatch:Fe,useSelect:je}=wp.data;ze("nhsblocks/rowgroup",{title:Qe("Grouped Items","nhsblocks"),category:"nhsblocks",icon:"layout",example:{},attributes:{template:{type:"array"}},edit:t=>{const{clientId:n,name:a}=t,{attributes:{template:l},setAttributes:s}=t,{replaceInnerBlocks:r}=Fe("core/block-editor"),{blockType:c,defaultVariation:o,hasInnerBlocks:i,variations:u}=je((e=>{const{getBlockVariations:t,getBlockType:l,getDefaultBlockVariation:s}=e("core/blocks");return{blockType:l(a),defaultVariation:s(a,"block"),hasInnerBlocks:e("core/block-editor").getBlocks(n).length>0,variations:t(a,"block")}}),[n,a]),m=e=>e.map((([e,t,n=[]])=>We(e,t,m(n))));return i?(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full"},(0,e.createElement)(Ge,{template:Ve}))):(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full"},(0,e.createElement)(Me,{variations:Ve,onSelect:e=>{e.attributes&&t.setAttributes(e.attributes),e.innerBlocks&&r(t.clientId,m(e.innerBlocks))}})))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-panel-group nhsuk-grid-column-full"},(0,e.createElement)(Ge.Content,null)))}}),ze("nhsblocks/onehalf",{title:Qe("One Half Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-half"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/onethird",{title:Qe("One Third Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-third"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/onequarter",{title:Qe("One Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-one-quarter"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/twothirds",{title:Qe("Two Thirds Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(Ge.Content,null))}}),ze("nhsblocks/threequarters",{title:Qe("Three Quarter Width","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/rowgroup"],attributes:{template:{type:"array"}},edit:t=>{const{attributes:{template:n},setAttributes:a}=t,l=null===n||!n;return(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters"},(0,e.createElement)(Ge,{template:l?null:n}))},save:t=>{const{attributes:{template:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-grid-column-three-quarters"},(0,e.createElement)(Ge.Content,null))}});const{__:Ye}=wp.i18n,{registerBlockType:Je}=wp.blocks,{RichText:Ke,InspectorControls:Xe,ColorPalette:Ze,MediaUpload:et,InnerBlocks:tt}=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:t=>{const{setAttributes:n,attributes:a,className:l}=t,{overlayColor:s,backgroundImage:r}=a;return[(0,e.createElement)(Xe,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Select a background image:"),(0,e.createElement)(et,{onSelect:function(e){n({backgroundImage:e.sizes.full.url})},type:"image",value:r,render:({open:t})=>(0,e.createElement)("button",{className:"button button-primary button-hero",onClick:t},"Upload Image!")})),(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"OR")," Select a background color: ",(0,e.createElement)("br",null),(0,e.createElement)("i",null,"(this will be ignored if you chose an image above)"),(0,e.createElement)(Ze,{value:s,onChange:function(e){n({overlayColor:e})}}))),(0,e.createElement)("section",{className:`${l}  nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description`,style:{backgroundColor:`${s}`,backgroundImage:`url(${r})`,backgroundSize:"cover",backgroundPosition:"center"}},(0,e.createElement)("div",{className:"nhsuk-hero__overlay"},(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(tt,{template:[["nhsblocks/heroinner",{}]]}))))))]},save:t=>{const{attributes:n,className:a}=t,{overlayColor:l,backgroundImage:s}=n;return(0,e.createElement)("section",{className:"nhsuk-hero nhsuk-hero--image nhsuk-hero--image-description",style:{backgroundImage:`url(${s})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:`${l}`}},(0,e.createElement)("div",{className:"nhsuk-hero__overlay"},(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)("div",{className:"nhsuk-grid-row"},(0,e.createElement)("div",{className:"nhsuk-grid-column-two-thirds"},(0,e.createElement)(tt.Content,null))))))}}),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:t=>{const{setAttributes:n,attributes:a,className:l}=t,{fontColor:s}=a;return[(0,e.createElement)(Xe,null,(0,e.createElement)("div",null,(0,e.createElement)("strong",null,"Select a font color:"),(0,e.createElement)(Ze,{value:s,onChange:function(e){n({fontColor:e})}}))),(0,e.createElement)("div",{className:"nhsuk-hero-content"},(0,e.createElement)(Ke,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",value:a.texttitle,onChange:function(e){n({texttitle:e})},placeholder:"Enter your text here!",style:{color:s}}),(0,e.createElement)(Ke,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",value:a.texttext,onChange:function(e){n({texttext:e})},placeholder:"Enter your text here!",style:{color:s}}),(0,e.createElement)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"}))]},save:t=>{const{attributes:n,className:a}=t,{fontColor:l}=n;return(0,e.createElement)("div",{className:"nhsuk-hero-content"},(0,e.createElement)(Ke.Content,{tagName:"h1",className:"nhsuk-u-margin-bottom-3",style:{color:l},value:n.texttitle}),(0,e.createElement)(Ke.Content,{tagName:"p",className:"nhsuk-body-l nhsuk-u-margin-bottom-0",style:{color:l},value:n.texttext}),(0,e.createElement)("span",{className:"nhsuk-hero__arrow","aria-hidden":"true"}))}});const{__:nt}=wp.i18n,{registerBlockType:at}=wp.blocks,{InnerBlocks:lt}=wp.blockEditor;at("nhsblocks/stripesblock",{title:nt("Stripes Block","nhsblocks"),description:nt("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:{
    22/* translators: example text. */
    33content:nt("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}},{name:"core/paragraph",attributes:{
     
    77content:nt("Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.")}},{name:"core/paragraph",attributes:{
    88/* translators: example text. */
    9 content:nt("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},getEditWrapperProps:()=>({"data-align":"full"}),edit:t=>(0,e.createElement)("div",{className:"nhsuk-striped-blocks"},(0,e.createElement)(lt,{template:[["nhsblocks/stripeblock",{}]],allowedBlocks:["nhsblocks/stripeblock"]})),save:t=>(0,e.createElement)(lt.Content,null)}),at("nhsblocks/stripeblock",{title:nt("Stripe Block","nhsblocks"),description:nt("Inner block that allows alternate grey stripes","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"menu-alt",getEditWrapperProps:()=>({"data-align":"full"}),edit:t=>{const n=wp.blocks.getBlockTypes().map((e=>e.name)).filter((e=>"nhsblocks/stripeblock"!==e));return(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)(lt,{allowedBlocks:n}))},save:t=>(0,e.createElement)("section",{className:"nhsuk-section"},(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)(lt.Content,null)))});const{__:st}=wp.i18n,{registerBlockType:rt}=wp.blocks,{RichText:ct,URLInput:ot,InnerBlocks:it}=wp.blockEditor,{Fragment:ut}=wp.element,{TextControl:mt}=wp.components;rt("nhsblocks/contentslist",{title:st("Contents List","nhsblocks"),description:st("Use contents lists to allow users to navigate between related pages, for example about a single condition.","nhsblocks"),category:"nhsblocks",icon:"editor-ul",keywords:[st("Contents List","nhsblocks"),st("Navigation","nhsblocks"),st("Related pages","nhsblocks")],example:{innerBlocks:[{name:"nhsblocks/contentslistitem",attributes:{text:"About",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"Symptoms",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"When to see a doctor",url:"#"}}]},edit:t=>{const{className:n,setAttributes:a,attributes:{title:l}}=t;return(0,e.createElement)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide"},(0,e.createElement)("h2",{className:"nhsuk-u-visually-hidden"},st("Contents","nhsblocks")),(0,e.createElement)("ol",{className:"nhsuk-contents-list__list"},(0,e.createElement)(it,{template:[["nhsblocks/contentslistitem",{}]],allowedBlocks:["nhsblocks/contentslistitem"]})))},save:t=>(0,e.createElement)("nav",{className:"nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide"},(0,e.createElement)("h2",{className:"nhsuk-u-visually-hidden"},st("Contents","nhsblocks")),(0,e.createElement)("ol",{className:"nhsuk-contents-list__list"},(0,e.createElement)(it.Content,null)))}),rt("nhsblocks/contentslistitem",{title:st("Contents List Item","nhsblocks"),description:st("List Item to go into the contents list","nhsblocks"),category:"nhsblocks",icon:"editor-ul",parent:["nhsblocks/contentslist"],attributes:{text:{type:"array",source:"children",selector:".pagename"},url:{type:"string",source:"attribute",attribute:"href",selector:"a"}},edit:t=>{const{className:n,setAttributes:a,isSelected:l,attributes:{text:s,url:r}}=t;return(0,e.createElement)("li",{className:"nhsuk-contents-list__item"},l?(0,e.createElement)("div",null,(0,e.createElement)(mt,{id:"example-input-field",label:(st("Link Text"),"nhsblocks"),value:s,onChange:e=>a({text:e})}),(0,e.createElement)(ot,{className:"nhsuk-contents-list__link",value:r,onChange:e=>a({url:e}),placeholder:"Page Link (start typing to choose link)"})):(0,e.createElement)(ut,null,r?(0,e.createElement)("a",{className:"nhsuk-contents-list__link",href:"{ url }"},s):(0,e.createElement)("span",{className:"nhsuk-contents-list__current"},s)))},save:t=>{const{className:n,attributes:{text:a,url:l}}=t;return(0,e.createElement)(ut,null,l?(0,e.createElement)("li",{className:"nhsuk-contents-list__item"},(0,e.createElement)("a",{className:"pagename nhsuk-contents-list__link",href:l},a)):(0,e.createElement)("li",{className:"nhsuk-contents-list__item","aria-current":"page"},(0,e.createElement)("span",{className:"pagename nhsuk-contents-list__current"},a)))}});const{__:ht}=wp.i18n,{registerBlockType:dt}=wp.blocks,{RichText:kt,URLInput:pt,InnerBlocks:bt}=wp.blockEditor,{withSelect:gt,subscribe:Et,select:vt}=wp.data,{Fragment:_t}=wp.element,{Button:wt,TextControl:yt}=wp.components;dt("nhsblocks/contentslistpage",{title:ht("Contents List within a page","nhsblocks"),description:ht("Use contents lists to allow users to navigate sections within a page. This will automatically add all h2 tags on this page to a scrollable list ","nhsblocks"),category:"nhsblocks",icon:"editor-ul",example:{attributes:{h2titles:[{text:"Heading number one",url:"#1",id:"11111"},{text:"Heading number two",url:"#2",id:"22222"},{text:"Heading number three",url:"#3",id:"33333"}]}},attributes:{h2titles:{type:"array",default:[]}},keywords:[ht("Contents List Page","nhsblocks"),ht("Navigation","nhsblocks"),ht("Related sections on page","nhsblocks")],edit:gt((e=>({blocks:e("core/block-editor").getBlocks()})))((({blocks:t,className:n,setAttributes:a,attributes:{h2titles:l}})=>{const s=[];let r=0;const c=e=>{if("core/heading"===e.name&&2===e.attributes.level){const t="nhs-block-anchor-"+r++,n=e.attributes.content.replace(/<[^>]+>/g,"");s.push({text:n,url:t,id:e.clientId})}e.innerBlocks&&e.innerBlocks.map(c)};t.map(c);const o=l.length==s.length&&l.every((function(e,t){return s[t].text===e.text&&s[t].url===e.url}));return(0,e.createElement)("div",null,(0,e.createElement)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide"},(0,e.createElement)("h2",{className:"nhsuk-u-visually-hidden"},ht("Contents","nhsblocks")),(0,e.createElement)("ol",{className:"nhsuk-contents-list__list"},l?l.map((t=>(0,e.createElement)("li",{className:"nhsuk-contents-list__item",key:t.url},(0,e.createElement)("a",{className:"nhsuk-contents-list__link",href:"#"+t.url},t.text)))):(0,e.createElement)("p",null,"Press the button below to make a table of contents for this page"),(0,e.createElement)("p",null,(0,e.createElement)(wt,{onClick:()=>{a({h2titles:s});for(let e=s.length-1;e>=0;e--)vt("core/block-editor").getBlock(s[e].id).attributes.anchor=s[e].url},className:"is-primary",disabled:o},"Update Heading Block")))))})),save:e=>{const{attributes:{h2titles:t}}=e;return null}});const{__:Nt}=wp.i18n,{registerBlockType:xt}=wp.blocks,{format:Tt}=wp.date,{RichText:ft,InnerBlocks:Ct}=wp.blockEditor,{dispatch:Bt,subscribe:It,select:Lt,withSelect:Pt}=wp.data;xt("nhsblocks/reviewdate",{title:Nt("Review Date","nhsblocks"),category:"nhsblocks",icon:"update",example:{attributes:{lastSaved:Nt("5 July 1948")}},attributes:{lastSaved:{type:"string",source:"html",selector:".last-saved-date"}},edit:Pt((e=>({savedDate:e("core/editor").getEditedPostAttribute("modified")})))((({savedDate:t,className:n,setAttributes:a,attributes:{lastSaved:l}})=>{if(t){const n=new Date(t),s=Tt("d F Y",n);return l!==s&&(void 0===l?(a({lastSaved:s}),Bt("core/editor").savePost()):a({lastSaved:s})),(0,e.createElement)("div",{className:"nhsuk-review-date"},(0,e.createElement)("p",{className:"nhsuk-body-s"},"Page last reviewed:"," ",(0,e.createElement)("span",{className:"last-saved-date"},l)))}})),save:t=>{const{className:n,attributes:{lastSaved:a}}=t;return(0,e.createElement)("div",{className:"nhsuk-review-date"},(0,e.createElement)("p",{className:"nhsuk-body-s"},"Page last reviewed:"," ",(0,e.createElement)("span",{className:"last-saved-date"},a)))}}),n(957);const St={};St.left=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-left",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M4.1 12.3l2.7 3c.2.2.5.2.7 0 .1-.1.1-.2.1-.3v-2h11c.6 0 1-.4 1-1s-.4-1-1-1h-11V9c0-.2-.1-.4-.3-.5h-.2c-.1 0-.3.1-.4.2l-2.7 3c0 .2 0 .4.1.6z"})),St.right=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-right",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M19.6 11.66l-2.73-3A.51.51 0 0016 9v2H5a1 1 0 000 2h11v2a.5.5 0 00.32.46.39.39 0 00.18 0 .52.52 0 00.37-.16l2.73-3a.5.5 0 000-.64z"}));const At=St,{__:qt}=wp.i18n,{registerBlockType:Rt}=wp.blocks,{RichText:Dt,InnerBlocks:Ot}=wp.blockEditor,{Fragment:$t}=wp.element,{URLInput:Ht}=wp.blockEditor,{TextControl:Ut}=wp.components;Rt("nhsblocks/pagination",{title:qt("Pagination","nhsblocks"),category:"nhsblocks",icon:"arrow-right-alt",example:{attributes:{prevText:qt("Page Title"),nextText:qt("Page Title")}},attributes:{prevLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--prev"},nextLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--next"},prevText:{type:"string",source:"html",selector:".prev-text",default:"Page Title"},nextText:{type:"string",source:"html",selector:".next-text",default:"Page Title"}},edit:t=>{const{className:n,isSelected:a,setAttributes:l,attributes:{prevLink:s,nextLink:r,prevText:c,nextText:o}}=t;return(0,e.createElement)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination"},(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-pagination__list"},(0,e.createElement)("li",{className:"nhsuk-pagination-item--previous"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev"},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Previous","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page"},c),At.left),a?(0,e.createElement)($t,null,(0,e.createElement)(Ut,{label:(qt("Page Title"),"nhsblocks"),value:c,hideLabelFromVision:!0,onChange:e=>l({prevText:e})}),(0,e.createElement)(Ht,{className:"url",value:s,onChange:e=>l({prevLink:e})})):null),(0,e.createElement)("li",{className:"nhsuk-pagination-item--next"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next"},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Next","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page"},o),At.right),a?(0,e.createElement)($t,null,(0,e.createElement)(Ut,{label:(qt("Page Title"),"nhsblocks"),value:o,hideLabelFromVision:!0,onChange:e=>l({nextText:e})}),(0,e.createElement)(Ht,{className:"url",value:r,onChange:e=>l({nextLink:e})})):null)))},save:t=>{const{className:n,attributes:{prevLink:a,nextLink:l,prevText:s,nextText:r}}=t;return(0,e.createElement)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination"},(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-pagination__list"},(0,e.createElement)("li",{className:"nhsuk-pagination-item--previous"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev",href:a},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Previous","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page prev-text"},s),At.left)),(0,e.createElement)("li",{className:"nhsuk-pagination-item--next"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next",href:l},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Next","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page next-text"},r),At.right))))}});const Vt={};Vt.action=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__arrow-right-circle",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M12 2a10 10 0 00-9.95 9h11.64L9.74 7.05a1 1 0 011.41-1.41l5.66 5.65a1 1 0 010 1.42l-5.66 5.65a1 1 0 01-1.41 0 1 1 0 010-1.41L13.69 13H2.05A10 10 0 1012 2z"})),Vt.back=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__chevron-left",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M8.5 12c0-.3.1-.5.3-.7l5-5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L10.9 12l4.3 4.3c.4.4.4 1 0 1.4s-1 .4-1.4 0l-5-5c-.2-.2-.3-.4-.3-.7z"}));const Qt=Vt,{__:zt}=wp.i18n,{registerBlockType:Wt}=wp.blocks,{URLInput:Gt}=wp.blockEditor,{Fragment:Mt}=wp.element,{TextControl:Ft}=wp.components;Wt("nhsblocks/actionlink",{title:zt("Action Link","nhsblocks"),description:"Use action links to help users get to the next stage of a journey quickly by signposting the start of a digital service.",category:"nhsblocks",icon:Qt.action,keywords:[zt("signpost start","nhsblocks"),zt("transactional services multi-page forms","nhsblocks")],example:{attributes:{actionText:zt("Call to Action")}},attributes:{actionText:{type:"string",source:"html",selector:".nhsuk-action-link__text"},actionLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-action-link__link"},arrowsvgs:{type:"string",source:"html",selector:"svg",default:Qt.action}},edit:t=>{const{className:n,setAttributes:a,isSelected:l,attributes:{actionText:s,actionLink:r,arrowssvgs:c}}=t;return(0,e.createElement)("div",{className:"nhsuk-action-link"},(0,e.createElement)("a",{className:"nhsuk-action-link__link"},Qt.action,(0,e.createElement)("span",{className:"nhsuk-action-link__text"},s)),l?(0,e.createElement)("div",null,(0,e.createElement)(Ft,{label:zt(" ","nhsblocks"),placeholder:zt("Call to Action","nhsblocks"),value:s,onChange:e=>a({actionText:e})}),(0,e.createElement)(Gt,{value:r,placeholder:zt("Add a link (type to search or paste a whole url)","nhsblocks"),onChange:e=>a({actionLink:e})})):null)},save:t=>{const{className:n,attributes:{actionText:a,actionLink:l,arrowssvgs:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-action-link"},(0,e.createElement)("a",{className:"nhsuk-action-link__link",href:l},Qt.action,(0,e.createElement)("span",{className:"nhsuk-action-link__text"},a)))}});const{__:jt}=wp.i18n,{registerBlockType:Yt}=wp.blocks,{URLInput:Jt}=wp.blockEditor,{Fragment:Kt}=wp.element,{TextControl:Xt}=wp.components;Yt("nhsblocks/backlink",{title:jt("Back Link","nhsblocks"),description:"Use back links to help users go back to the previous page in a multi-page transaction.",category:"nhsblocks",icon:Qt.back,keywords:[jt("Back Link previous question pages","nhsblocks"),jt("transactional services multi-page forms","nhsblocks")],example:{attributes:{backText:jt("Go back")}},attributes:{backText:{type:"string",source:"html",selector:".nhsuk-back-link span",default:"Go back"}},edit:t=>{const{className:n,setAttributes:a,isSelected:l,attributes:{backText:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-back-link"},(0,e.createElement)("a",{className:"nhsuk-back-link__link js-back-link"},Qt.back,s),l?(0,e.createElement)(Xt,{label:jt("Action Link Text","nhsblocks"),value:s,onChange:e=>a({backText:e})}):null)},save:t=>{const{attributes:{backText:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-back-link"},(0,e.createElement)("a",{className:"nhsuk-back-link__link js-back-link",onClick:"window.history.back()",href:"#"},Qt.back,(0,e.createElement)("span",null,n)))}})})()})();
     9content:nt("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},getEditWrapperProps:()=>({"data-align":"full"}),edit:t=>(0,e.createElement)("div",{className:"nhsuk-striped-blocks"},(0,e.createElement)(lt,{template:[["nhsblocks/stripeblock",{}]],allowedBlocks:["nhsblocks/stripeblock"]})),save:t=>(0,e.createElement)(lt.Content,null)}),at("nhsblocks/stripeblock",{title:nt("Stripe Block","nhsblocks"),description:nt("Inner block that allows alternate grey stripes","nhsblocks"),category:"nhsblocks",parent:["nhsblocks/heroblock"],icon:"menu-alt",getEditWrapperProps:()=>({"data-align":"full"}),edit:t=>{const n=wp.blocks.getBlockTypes().map((e=>e.name)).filter((e=>"nhsblocks/stripeblock"!==e));return(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)(lt,{allowedBlocks:n}))},save:t=>(0,e.createElement)("section",{className:"nhsuk-section"},(0,e.createElement)("div",{className:"nhsuk-width-container"},(0,e.createElement)(lt.Content,null)))});const{__:st}=wp.i18n,{registerBlockType:rt}=wp.blocks,{RichText:ct,URLInput:ot,InnerBlocks:it}=wp.blockEditor,{Fragment:ut}=wp.element,{TextControl:mt}=wp.components;rt("nhsblocks/contentslist",{title:st("Contents List","nhsblocks"),description:st("Use contents lists to allow users to navigate between related pages, for example about a single condition.","nhsblocks"),category:"nhsblocks",icon:"editor-ul",keywords:[st("Contents List","nhsblocks"),st("Navigation","nhsblocks"),st("Related pages","nhsblocks")],example:{innerBlocks:[{name:"nhsblocks/contentslistitem",attributes:{text:"About",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"Symptoms",url:"#"}},{name:"nhsblocks/contentslistitem",attributes:{text:"When to see a doctor",url:"#"}}]},edit:t=>{const{className:n,setAttributes:a,attributes:{title:l}}=t;return(0,e.createElement)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide"},(0,e.createElement)("h2",{className:"nhsuk-u-visually-hidden"},st("Contents","nhsblocks")),(0,e.createElement)("ol",{className:"nhsuk-contents-list__list"},(0,e.createElement)(it,{template:[["nhsblocks/contentslistitem",{}]],allowedBlocks:["nhsblocks/contentslistitem"]})))},save:t=>(0,e.createElement)("nav",{className:"nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide"},(0,e.createElement)("h2",{className:"nhsuk-u-visually-hidden"},st("Contents","nhsblocks")),(0,e.createElement)("ol",{className:"nhsuk-contents-list__list"},(0,e.createElement)(it.Content,null)))}),rt("nhsblocks/contentslistitem",{title:st("Contents List Item","nhsblocks"),description:st("List Item to go into the contents list","nhsblocks"),category:"nhsblocks",icon:"editor-ul",parent:["nhsblocks/contentslist"],attributes:{text:{type:"array",source:"children",selector:".pagename"},url:{type:"string",source:"attribute",attribute:"href",selector:"a"}},edit:t=>{const{className:n,setAttributes:a,isSelected:l,attributes:{text:s,url:r}}=t;return(0,e.createElement)("li",{className:"nhsuk-contents-list__item"},l?(0,e.createElement)("div",null,(0,e.createElement)(mt,{id:"example-input-field",label:(st("Link Text"),"nhsblocks"),value:s,onChange:e=>a({text:e})}),(0,e.createElement)(ot,{className:"nhsuk-contents-list__link",value:r,onChange:e=>a({url:e}),placeholder:"Page Link (start typing to choose link)"})):(0,e.createElement)(ut,null,r?(0,e.createElement)("a",{className:"nhsuk-contents-list__link",href:"{ url }"},s):(0,e.createElement)("span",{className:"nhsuk-contents-list__current"},s)))},save:t=>{const{className:n,attributes:{text:a,url:l}}=t;return(0,e.createElement)(ut,null,l?(0,e.createElement)("li",{className:"nhsuk-contents-list__item"},(0,e.createElement)("a",{className:"pagename nhsuk-contents-list__link",href:l},a)):(0,e.createElement)("li",{className:"nhsuk-contents-list__item","aria-current":"page"},(0,e.createElement)("span",{className:"pagename nhsuk-contents-list__current"},a)))}});const{__:ht}=wp.i18n,{registerBlockType:dt}=wp.blocks,{RichText:kt,URLInput:pt,InnerBlocks:bt}=wp.blockEditor,{withSelect:gt,subscribe:Et,select:vt}=wp.data,{Fragment:_t}=wp.element,{Button:wt,TextControl:yt}=wp.components;dt("nhsblocks/contentslistpage",{title:ht("Contents List within a page","nhsblocks"),description:ht("Use contents lists to allow users to navigate sections within a page. This will automatically add all h2 tags on this page to a scrollable list ","nhsblocks"),category:"nhsblocks",icon:"editor-ul",example:{attributes:{h2titles:[{text:"Heading number one",url:"#1",id:"11111"},{text:"Heading number two",url:"#2",id:"22222"},{text:"Heading number three",url:"#3",id:"33333"}]}},attributes:{h2titles:{type:"array",default:[]}},keywords:[ht("Contents List Page","nhsblocks"),ht("Navigation","nhsblocks"),ht("Related sections on page","nhsblocks")],edit:gt((e=>({blocks:e("core/block-editor").getBlocks()})))((({blocks:t,className:n,setAttributes:a,attributes:{h2titles:l}})=>{const s=[];let r=0;const c=e=>{if("core/heading"===e.name&&2===e.attributes.level){const t="nhs-block-anchor-"+r++,n=e.attributes.content.replace(/<[^>]+>/g,"");s.push({text:n,url:t,id:e.clientId})}e.innerBlocks&&e.innerBlocks.map(c)};t.map(c);const o=l.length==s.length&&l.every((function(e,t){return s[t].text===e.text&&s[t].url===e.url}));return(0,e.createElement)("div",null,(0,e.createElement)("nav",{className:"{ className } nhsuk-contents-list",role:"navigation","aria-label":"Pages in this guide"},(0,e.createElement)("h2",{className:"nhsuk-u-visually-hidden"},ht("Contents","nhsblocks")),(0,e.createElement)("ol",{className:"nhsuk-contents-list__list"},l?l.map((t=>(0,e.createElement)("li",{className:"nhsuk-contents-list__item",key:t.url},(0,e.createElement)("a",{className:"nhsuk-contents-list__link",href:"#"+t.url},t.text)))):(0,e.createElement)("p",null,"Press the button below to make a table of contents for this page"),(0,e.createElement)("p",null,(0,e.createElement)(wt,{onClick:()=>{a({h2titles:s});for(let e=s.length-1;e>=0;e--)vt("core/block-editor").getBlock(s[e].id).attributes.anchor=s[e].url},className:"is-primary",disabled:o},"Update Heading Block")))))})),save:e=>{const{attributes:{h2titles:t}}=e;return null}});const{__:Nt}=wp.i18n,{registerBlockType:xt}=wp.blocks,{format:Tt}=wp.date,{RichText:ft,InnerBlocks:Ct}=wp.blockEditor,{dispatch:Bt,subscribe:It,select:Lt,withSelect:Pt}=wp.data;xt("nhsblocks/reviewdate",{title:Nt("Review Date","nhsblocks"),category:"nhsblocks",icon:"update",example:{attributes:{lastSaved:Nt("5 July 1948")}},attributes:{lastSaved:{type:"string",source:"html",selector:".last-saved-date"}},edit:Pt((e=>({savedDate:e("core/editor").getEditedPostAttribute("modified")})))((({savedDate:t,className:n,setAttributes:a,attributes:{lastSaved:l}})=>{if(t){const n=new Date(t),s=Tt("d F Y",n);return l!==s&&(void 0===l?(a({lastSaved:s}),Bt("core/editor").savePost()):a({lastSaved:s})),(0,e.createElement)("div",{className:"nhsuk-review-date"},(0,e.createElement)("p",{className:"nhsuk-body-s"},"Page last reviewed:"," ",(0,e.createElement)("span",{className:"last-saved-date"},l)))}})),save:t=>{const{className:n,attributes:{lastSaved:a}}=t;return(0,e.createElement)("div",{className:"nhsuk-review-date"},(0,e.createElement)("p",{className:"nhsuk-body-s"},"Page last reviewed:"," ",(0,e.createElement)("span",{className:"last-saved-date"},a)))}}),n(574);const St={};St.left=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-left",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M4.1 12.3l2.7 3c.2.2.5.2.7 0 .1-.1.1-.2.1-.3v-2h11c.6 0 1-.4 1-1s-.4-1-1-1h-11V9c0-.2-.1-.4-.3-.5h-.2c-.1 0-.3.1-.4.2l-2.7 3c0 .2 0 .4.1.6z"})),St.right=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",ariaHidden:"true",className:"nhsuk-icon nhsuk-icon__arrow-right",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M19.6 11.66l-2.73-3A.51.51 0 0016 9v2H5a1 1 0 000 2h11v2a.5.5 0 00.32.46.39.39 0 00.18 0 .52.52 0 00.37-.16l2.73-3a.5.5 0 000-.64z"}));const At=St,{__:qt}=wp.i18n,{registerBlockType:Rt}=wp.blocks,{RichText:Dt,InnerBlocks:Ot}=wp.blockEditor,{Fragment:$t}=wp.element,{URLInput:Ht}=wp.blockEditor,{TextControl:Ut}=wp.components;Rt("nhsblocks/pagination",{title:qt("Pagination","nhsblocks"),category:"nhsblocks",icon:"arrow-right-alt",example:{attributes:{prevText:qt("Page Title"),nextText:qt("Page Title")}},attributes:{prevLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--prev"},nextLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-pagination__link--next"},prevText:{type:"string",source:"html",selector:".prev-text",default:"Page Title"},nextText:{type:"string",source:"html",selector:".next-text",default:"Page Title"}},edit:t=>{const{className:n,isSelected:a,setAttributes:l,attributes:{prevLink:s,nextLink:r,prevText:c,nextText:o}}=t;return(0,e.createElement)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination"},(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-pagination__list"},(0,e.createElement)("li",{className:"nhsuk-pagination-item--previous"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev"},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Previous","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page"},c),At.left),a?(0,e.createElement)($t,null,(0,e.createElement)(Ut,{label:(qt("Page Title"),"nhsblocks"),value:c,hideLabelFromVision:!0,onChange:e=>l({prevText:e})}),(0,e.createElement)(Ht,{className:"url",value:s,onChange:e=>l({prevLink:e})})):null),(0,e.createElement)("li",{className:"nhsuk-pagination-item--next"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next"},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Next","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page"},o),At.right),a?(0,e.createElement)($t,null,(0,e.createElement)(Ut,{label:(qt("Page Title"),"nhsblocks"),value:o,hideLabelFromVision:!0,onChange:e=>l({nextText:e})}),(0,e.createElement)(Ht,{className:"url",value:r,onChange:e=>l({nextLink:e})})):null)))},save:t=>{const{className:n,attributes:{prevLink:a,nextLink:l,prevText:s,nextText:r}}=t;return(0,e.createElement)("nav",{className:"nhsuk-pagination",role:"navigation","aria-label":"Pagination"},(0,e.createElement)("ul",{className:"nhsuk-list nhsuk-pagination__list"},(0,e.createElement)("li",{className:"nhsuk-pagination-item--previous"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--prev",href:a},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Previous","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page prev-text"},s),At.left)),(0,e.createElement)("li",{className:"nhsuk-pagination-item--next"},(0,e.createElement)("a",{className:"nhsuk-pagination__link nhsuk-pagination__link--next",href:l},(0,e.createElement)("span",{className:"nhsuk-pagination__title"},qt("Next","nhsblocks")),(0,e.createElement)("span",{className:"nhsuk-u-visually-hidden"},":"),(0,e.createElement)("span",{className:"nhsuk-pagination__page next-text"},r),At.right))))}});const Vt={};Vt.action=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__arrow-right-circle",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M12 2a10 10 0 00-9.95 9h11.64L9.74 7.05a1 1 0 011.41-1.41l5.66 5.65a1 1 0 010 1.42l-5.66 5.65a1 1 0 01-1.41 0 1 1 0 010-1.41L13.69 13H2.05A10 10 0 1012 2z"})),Vt.back=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"nhsuk-icon nhsuk-icon__chevron-left",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M8.5 12c0-.3.1-.5.3-.7l5-5c.4-.4 1-.4 1.4 0s.4 1 0 1.4L10.9 12l4.3 4.3c.4.4.4 1 0 1.4s-1 .4-1.4 0l-5-5c-.2-.2-.3-.4-.3-.7z"}));const Qt=Vt,{__:zt}=wp.i18n,{registerBlockType:Wt}=wp.blocks,{URLInput:Gt}=wp.blockEditor,{Fragment:Mt}=wp.element,{TextControl:Ft}=wp.components;Wt("nhsblocks/actionlink",{title:zt("Action Link","nhsblocks"),description:"Use action links to help users get to the next stage of a journey quickly by signposting the start of a digital service.",category:"nhsblocks",icon:Qt.action,keywords:[zt("signpost start","nhsblocks"),zt("transactional services multi-page forms","nhsblocks")],example:{attributes:{actionText:zt("Call to Action")}},attributes:{actionText:{type:"string",source:"html",selector:".nhsuk-action-link__text"},actionLink:{type:"string",source:"attribute",attribute:"href",selector:"a.nhsuk-action-link__link"},arrowsvgs:{type:"string",source:"html",selector:"svg",default:Qt.action}},edit:t=>{const{className:n,setAttributes:a,isSelected:l,attributes:{actionText:s,actionLink:r,arrowssvgs:c}}=t;return(0,e.createElement)("div",{className:"nhsuk-action-link"},(0,e.createElement)("a",{className:"nhsuk-action-link__link"},Qt.action,(0,e.createElement)("span",{className:"nhsuk-action-link__text"},s)),l?(0,e.createElement)("div",null,(0,e.createElement)(Ft,{label:zt(" ","nhsblocks"),placeholder:zt("Call to Action","nhsblocks"),value:s,onChange:e=>a({actionText:e})}),(0,e.createElement)(Gt,{value:r,placeholder:zt("Add a link (type to search or paste a whole url)","nhsblocks"),onChange:e=>a({actionLink:e})})):null)},save:t=>{const{className:n,attributes:{actionText:a,actionLink:l,arrowssvgs:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-action-link"},(0,e.createElement)("a",{className:"nhsuk-action-link__link",href:l},Qt.action,(0,e.createElement)("span",{className:"nhsuk-action-link__text"},a)))}});const{__:jt}=wp.i18n,{registerBlockType:Yt}=wp.blocks,{URLInput:Jt}=wp.blockEditor,{Fragment:Kt}=wp.element,{TextControl:Xt}=wp.components;Yt("nhsblocks/backlink",{title:jt("Back Link","nhsblocks"),description:"Use back links to help users go back to the previous page in a multi-page transaction.",category:"nhsblocks",icon:Qt.back,keywords:[jt("Back Link previous question pages","nhsblocks"),jt("transactional services multi-page forms","nhsblocks")],example:{attributes:{backText:jt("Go back")}},attributes:{backText:{type:"string",source:"html",selector:".nhsuk-back-link span",default:"Go back"}},edit:t=>{const{className:n,setAttributes:a,isSelected:l,attributes:{backText:s}}=t;return(0,e.createElement)("div",{className:"nhsuk-back-link"},(0,e.createElement)("a",{className:"nhsuk-back-link__link js-back-link"},Qt.back,s),l?(0,e.createElement)(Xt,{label:jt("Action Link Text","nhsblocks"),value:s,onChange:e=>a({backText:e})}):null)},save:t=>{const{attributes:{backText:n}}=t;return(0,e.createElement)("div",{className:"nhsuk-back-link"},(0,e.createElement)("a",{className:"nhsuk-back-link__link js-back-link",onClick:"window.history.back()",href:"#"},Qt.back,(0,e.createElement)("span",null,n)))}})})()})();
  • nhsblocks/trunk/nhsblocks.php

    r3127995 r3196629  
    99 * Tested up to: 6.2
    1010 *
    11  * Version: 1.3.16
    12  * Stable tag: 1.3.16
     11 * Version: 1.3.17
     12 * Stable tag: 1.3.17
    1313 *
    1414 * @package nhsblocks
     
    1717defined( 'ABSPATH' ) || exit;
    1818
     19if (!function_exists('get_plugin_data')) {
     20    require_once ABSPATH . 'wp-admin/includes/plugin.php';
     21}
    1922/**
    2023 * Load translations (if any) for the plugin from the /languages/ folder.
  • nhsblocks/trunk/readme.txt

    r3127995 r3196629  
    66Requires at least: 5.3
    77Tested up to: 6.6
    8 Stable tag: 1.3.16
     8Stable tag: 1.3.17
    99Requires PHP: 5.6
    1010License: GPLv3 or later
     
    5555
    5656== Changelog ==
     57
     58= 1.3.17 =
     59 * Fix error when trying to activate this plugin before theme selection
     60 * Security update
    5761
    5862= 1.3.16 =
  • nhsblocks/trunk/style.css

    r3127995 r3196629  
    99Tags: NHS, NHS Digital, NHS Frontend, National Health Service, Leadership Academy
    1010Description: Gutenberg native custom blocks companion plugin for the NHS Nightingale theme (can also be standalone).
    11 Version: 1.3.16
     11Version: 1.3.17
    1212
    1313**********************************************************************************************/
Note: See TracChangeset for help on using the changeset viewer.