var H=t=>{throw TypeError(t)};var D=(t,e,i)=>e.has(t)||H("Cannot "+i);var _=(t,e,i)=>(D(t,e,"read from private field"),i?i.call(t):e.get(t)),x=(t,e,i)=>e.has(t)?H("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),w=(t,e,i,a)=>(D(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i);import{p as g,f as y,a as m,C as E,s as J}from"./props-b4vEeO_8.js";import{au as N,k as p,V as Q,r as W,u as X,av as C,t as Y,F as u,I as n,J as F,B as R,G as V,N as Z,D as $}from"./runtime-C3rQLW--.js";import{i as ee}from"./lifecycle-F2p_Qkk3.js";import{c as te,d as ie}from"./create-runtime-stories-7AWWVphH.js";import{e as ae,i as re}from"./each-CVpBMMjG.js";import{B as se}from"./Block-D3Ui8rd-.js";import{i as B,s as q}from"./svelte-component-C8Ginrj8.js";import{M as A}from"./Markdown-DUxFwijc.js";import{s as M}from"./style-DvJ3IcV1.js";function ne(t){let e=0,i=Q(0),a;return()=>{N()&&(p(i),W(()=>(e===0&&(a=X(()=>t(()=>C(i)))),e+=1,()=>{Y(()=>{e-=1,e===0&&(a==null||a(),a=void 0,C(i))})})))}}var oe=y('
');function I(t,e){let i=g(e,"img",3,""),a=g(e,"colour",3,"var(--theme-colour-accent)");var r=oe(),s=n(r),d=u(s,2);F(()=>{M(s,`background-color: ${a()??""};`),M(d,`background-image: url(${i()??""}); `)}),m(t,r)}I.__docgen={data:[{name:"img",visibility:"public",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1,defaultValue:'""'},{name:"colour",visibility:"public",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1,defaultValue:'"var(--theme-colour-accent)"'}],name:"Headshot.svelte"};var v,f;class de{constructor(e,i){x(this,v);x(this,f);w(this,v,e),w(this,f,ne(i))}get current(){return _(this,f).call(this),_(this,v).call(this)}}v=new WeakMap,f=new WeakMap;const le=/\(.+\)/,ce=new Set(["all","print","screen","and","or","not","only"]);class ue extends de{constructor(e,i){let a=le.test(e)||e.split(/[\s,]+/).some(s=>ce.has(s.trim()))?e:`(${e})`;const r=window.matchMedia(a);super(()=>r.matches,s=>E(r,"change",s))}}var me=y(''),pe=y(''),ve=y('');function O(t,e){R(e,!0);const i=new ue("max-width: 600px");var a=ve(),r=n(a),s=n(r),d=n(s);I(d,{get img(){return e.img},get colour(){return e.colour}});var h=u(s,2),l=n(h),k=n(l),S=u(l,2),K=n(S),L=u(S,2);{var T=o=>{var c=me(),b=n(c);A(b,{get source(){return e.text}}),m(o,c)};B(L,o=>{i.current||o(T)})}var j=u(r,2);{var U=o=>{var c=pe(),b=n(c);A(b,{get source(){return e.text}}),m(o,c)};B(j,o=>{i.current&&o(U)})}F(()=>{q(k,e.name),q(K,e.role||"")}),m(t,a),V()}O.__docgen={data:[{name:"img",visibility:"public",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"name",visibility:"public",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"role",visibility:"public",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"text",visibility:"public",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"colour",visibility:"public",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1}],name:"KeyFigure.svelte"};var fe=y('');function P(t,e){let i=g(e,"width",3,"normal"),a=g(e,"colour",3,"#cccccc");se(t,{get class(){return`fmy-6 ${e.class??""} ${e.id??""} ${i()??""}`},children:(r,s)=>{var d=fe();ae(d,21,()=>e.figures,re,(h,l)=>{{let k=Z(()=>({...p(l),colour:p(l).colour??a()}));O(h,J(()=>p(k)))}}),m(r,d)},$$slots:{default:!0}})}P.__docgen={data:[{name:"class",visibility:"public",description:"Add classes to target with custom CSS.",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"id",visibility:"public",description:"Add an id to target with custom CSS.",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"width",visibility:"public",description:"Width of the container.",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"const",type:"string",value:"normal",text:'"normal"'},{kind:"const",type:"string",value:"wide",text:'"wide"'}],text:'"normal" | "wide"'},static:!1,readonly:!1,defaultValue:'"normal"'},{name:"colour",visibility:"public",description:"Default background colour to be used as a mount behind the headshot.",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1,defaultValue:'"#cccccc"'},{name:"figures",visibility:"public",description:"Individual figures -- i.e., people -- for the headpile.",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"type",type:"array",text:"{ img: string; name: string; role?: string | undefined; text: string; colour?: string | undefined; }[]"},static:!1,readonly:!1}],name:"Headpile.svelte"};const ye=""+new URL("abdel-CP71I64v.png",import.meta.url).href,ge=""+new URL("hemedti-BoYKd5Xs.png",import.meta.url).href,z={title:"Components/Text elements/Headpile",component:P,argTypes:{}},{Story:he}=ie(),ke=[{name:"General Abdel Fattah al-Burhan",role:"Sudan's Sovereign Council Chief and military commander",img:ye,text:"Burhan was little known in public life until taking part in the coup against Bashir in 2019 after a popular uprising against his rule. In August 2019, his role as de facto head of state was affirmed when he became head of the Sovereign Council, a body comprising civilian and military leaders formed to oversee the transition towards elections."},{name:"General Mohamed Hamdan Dagalo",role:"Leader of the Sudanese paramilitary Rapid Support Forces (RSF)",img:ge,text:`Popularly known as Hemedti, Dagalo rose from lowly beginnings as a camel trader to head a widely feared Arab militia that crushed a revolt in Darfur, winning him influence and eventually a role as Sudan's former deputy head of state.\r
\r
Over the past decade, he has been a key figure in Sudanese politics, aiding in the ousting of Bashir in 2019 and suppressing pro-democracy protests. As the country limped from one economic crisis to another, Hemedti became one of Sudan’s richest men, exporting gold from mines in Darfur seized by his fighters.`,colour:"#afb776"}];function G(t,e){R(e,!1),ee();{let i=$(()=>({figures:ke}));he(t,{name:"Demo",get args(){return p(i)},parameters:{__svelteCsf:{rawCode:""}}})}V()}G.__docgen={version:3,name:"Headpile.stories.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const be=te(G,z),_e=["Demo"],xe=be.Demo,Re=Object.freeze(Object.defineProperty({__proto__:null,Demo:xe,__namedExportsOrder:_e,default:z},Symbol.toStringTag,{value:"Module"}));export{xe as D,Re as H};