pub use crate::state::*;
use anchor_lang::{prelude::*, system_program::System};
#[derive(Accounts)]
#[instruction(_trigger_index: u64, _task_index: u8)]
pub struct CloseTask<'info> {
#[account(mut)]
authority: Signer<'info>,
#[account(mut, seeds = ["payer".as_bytes(), authority.key().as_ref()], bump)]
payer: SystemAccount<'info>,
#[account(mut, seeds = ["trigger".as_bytes(), &authority.key().as_ref(), &_trigger_index.to_le_bytes()], bump )]
trigger: Account<'info, Trigger>,
#[account(mut, close = authority, seeds = ["task".as_bytes(), &trigger.key().as_ref(), &_task_index.to_le_bytes()], bump)]
task: Account<'info, Task>,
system_program: Program<'info, System>,
}
pub fn handler(_ctx: Context<CloseTask>, _trigger_index: u64, _task_index: u8) -> Result<()> {
Ok(())
}