(()=>{"use strict";const e=window.React,s=window.wp.blocks,t=window.wp.blockEditor,n=window.wp.components,r=window.wp.i18n,i=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},(0,e.createElement)("path",{fill:"currentColor",d:"M4 4h4v4H4V4zm6 1v2h10V5H10zm-6 5h4v4H4v-4zm6 1v2h10v-2H10zm-6 5h4v4H4v-4zm6 1v2h10v-2H10z"}));(0,s.registerBlockType)("pressprimer-assignment/my-submissions",{icon:i,edit:function(s){const{attributes:o,setAttributes:a}=s,{perPage:l,showStatus:m,showScore:p,showDate:g}=o,c=(0,t.useBlockProps)();return(0,e.createElement)("div",{...c},(0,e.createElement)(t.InspectorControls,null,(0,e.createElement)(n.PanelBody,{title:(0,r.__)("Display Settings","pressprimer-assignment"),initialOpen:!0},(0,e.createElement)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Show Status","pressprimer-assignment"),help:(0,r.__)("Display the submission status for each entry","pressprimer-assignment"),checked:m,onChange:e=>a({showStatus:e})}),(0,e.createElement)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Show Score","pressprimer-assignment"),help:(0,r.__)("Display the score for graded submissions","pressprimer-assignment"),checked:p,onChange:e=>a({showScore:e})}),(0,e.createElement)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Show Date","pressprimer-assignment"),help:(0,r.__)("Display the date when each submission was made","pressprimer-assignment"),checked:g,onChange:e=>a({showDate:e})}),(0,e.createElement)(n.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,r.__)("Submissions Per Page","pressprimer-assignment"),help:(0,r.__)("Number of submissions to show per page","pressprimer-assignment"),value:l,onChange:e=>a({perPage:e}),min:5,max:50,step:5}))),(0,e.createElement)(n.Placeholder,{icon:i,label:(0,r.__)("PPA My Submissions","pressprimer-assignment"),instructions:(0,r.__)("This block displays the current user's assignment submissions. Configure display options in the sidebar.","pressprimer-assignment")},(0,e.createElement)("div",{style:{textAlign:"left",width:"100%",padding:"20px"}},(0,e.createElement)("p",{style:{margin:"0 0 10px",color:"#666",fontSize:"14px"}},(0,e.createElement)("strong",null,(0,r.__)("Settings:","pressprimer-assignment"))),(0,e.createElement)("ul",{style:{margin:0,paddingLeft:"20px",color:"#666",fontSize:"13px"}},(0,e.createElement)("li",null,(0,r.__)("Show Status:","pressprimer-assignment")," ",(0,e.createElement)("strong",null,m?(0,r.__)("Yes","pressprimer-assignment"):(0,r.__)("No","pressprimer-assignment"))),(0,e.createElement)("li",null,(0,r.__)("Show Score:","pressprimer-assignment")," ",(0,e.createElement)("strong",null,p?(0,r.__)("Yes","pressprimer-assignment"):(0,r.__)("No","pressprimer-assignment"))),(0,e.createElement)("li",null,(0,r.__)("Show Date:","pressprimer-assignment")," ",(0,e.createElement)("strong",null,g?(0,r.__)("Yes","pressprimer-assignment"):(0,r.__)("No","pressprimer-assignment"))),(0,e.createElement)("li",null,(0,r.__)("Per Page:","pressprimer-assignment")," ",(0,e.createElement)("strong",null,l))),(0,e.createElement)("p",{style:{marginTop:"15px",color:"#999",fontSize:"12px",fontStyle:"italic"}},(0,r.__)("Preview not available in editor. The list will display on the frontend for logged-in users.","pressprimer-assignment")))))},save:()=>null})})();